Decoding apparatus for shape signal

ABSTRACT

It is an object to encode an image signal or a shape signal more efficiently than the prior art. As a means to accomplish the object, the change pixel detector  2  receives the input signal  1  as an input signal and detects the pixel which changes the two-valued pixel value. Further, the change pixel predictor  4  also reads out the reference image stored in the memory  3,  and predicts the change pixel of the particular input signal. The difference value calculator  5  subtracts the output of the change pixel predictor  4  from the output of the change pixel detector  2.  The difference value rounder  7  compares the tolerance value e and the prediction error D, and outputs x which requires the minimum bit number for being encoded in the value D−e≦x≦D+e. The output of the difference value rounder  7  is encoded by the decoder  8  to become the encoded signal  9.  Also, the output of the difference value rounder  7  is added in the difference value adder  11  to the predicted pixel  4  of the predicted pixel predictor  4,  whereby the change pixel is calculated, and in the change pixel decoder  10,  the respective pixels from the already decoded pixel indicated by the change pixel predictor  4  to the change pixel is decoded to be stored in the memory  3.

This is a Rule 1.53(b) Continuation application of Ser. No. 09/000,077filed Mar. 9, 1998, now pending.

FIELD OF TECHNOLOGY

This invention relates to an image encoding apparatus, an image decodingapparatus, an image encoding method, an image decoding method, an imageencoding program recording medium and an image decoding programrecording medium.

PRIOR ART

The image encoding technology has a long history. There has beenestablished excellent standard proposals such as ITU-T H.261, ITU-TH263, ISO MPEG1/2 and so on. Roughly speaking, the image encoding methodhas two approaches: an encoding method using the orthogonal transformand a prediction encoding method encoding the error of predicted valueswith the use of the prediction function.

Although the encoding method using the orthogonal transform needscomplicated calculation, when encoded signals of small bit numbers areobtained, it is possible to keep better picture quality than theprediction encoding method. The ordinary encoding method usingorthogonal transform such as JPEG, MPEG and the like utilizes theDCT(Discrete Cosine Transform). Though it is known that DCT enablesencoding by a small number of bits, it has own problems in that it needshigh-precision multiplication, resulting in complicated calculation, andin that the reversible encoding is impossible. Accordingly, DCTcalculation can not be used in the fields in which the reversibility isrequired.

As opposed to this, the prediction encoding method needs simplecalculations and can do the reversible encoding. MMR(Modified ModifiedRead) used in facsimiles is famous as an image coding method havingreversibility. MMR is used according to CCITT Rec.T6 “Facsimile CodingSchemes and Coding Control Functions for Group 4 Facsimile Apparatus”.In this method, the difference value in the horizontal direction betweenthe change points of pixel values on the immediately previousalready-coded scanning line and the change points of pixel value on thenot-yet-coded scanning line is variable-length encoded. MMMR (ModifiedMMR) which is a further improved MMR is used as the evaluation model forMPEG4 (ISO/IEC/JTC/SC29/WG11 N1277, July 1996).

Incidentally, if image signals are separated into the objects and thenthe objects are processed as arbitrary shapes, image can be operated andsynthesized, object by object, which leads to the effectivesignal-transmission. For applications which restrict bit number, byusing such information, it is possible to selectively assign priority toimportant objects to transmit and record the same. However, the priorart technology has not taken into account the encoding of objects havingarbitrary shapes. And the standardization of coding for image signalshaving arbitrary shapes has been proceeding in the ISO MPEG4. In MPEG4,the evaluation model called VM3.0 (printed in ISO/IEC/JTC1/SC29/WG11N1277) is created, which is now a unique image encoding method that canencode image signals having arbitrary shapes.

An image signal having arbitrary shapes ordinarily consists of the shapeinformation indicating the shape of an object and the pixel valueinformation (color information) representing pixel values within anobject. Concerning the shape information, the two-valued shapeinformation indicating whether each pixel is significant(on the insideof the shape) or insignificant(on the outside of the shape), or thetransparency information indicating the ratio(how much the objectoccludes the background) of respective pixels which is used insynthesizing with other images. When the transparency has only twolevels, 0% and 100%, the shape information is identical to thetransparency information and thereby the arbitrary-shape-having imagesignal is represented by the two of the two-valued shape information andthe pixel value information.

FIG. 53 is a drawing for explaining these information. The transparencyinformation is an information representing how much ratio of each pixelis used for synthesis when a fish shown in FIG. 53(a) is synthesizedwith the other image. In FIG. 53(b), there is shown the value oftransparency information in the horizontal scanning line indicated by adotted line in the figure. The outside of the fish is perfectlytransparent. Here, the transparency 0 is defined as being perfectlytransparent for simplification. Hence, on the outside of the fish thetransparency information has a value of 0, while on the inside of thefish it has a value of non-0.

FIG. 53(c) shows the transparency which is made two-valued as having twoof 0 and non-0. In FIG. 53(c), the pixels having the non-0 transparencyrequire encoding of the pixel value information, while the pixels havingthe 0 transparency do not need the pixel value information, so that thetwo-valued transparency information is very important to the pixel valueinformation encoding. On the other hand, the component of thetransparency information which can not be represented by two-valuedinformation, as shown in FIG. 53(d), is multi-valued information whichis called gray scale. The shape information represented by multi-valuedinformation as described above can be treated by the waveform encodingsimilar as that for the pixel value information.

While performing the image encoding, the intra-frame encoding based onthe spacial correlation or the temporal correlation is separately used,both of the two are employed. In the inter-frame encoding, the motion inthe close frames is detected, and the motion compensation is carried outfor the detected motion. The motion vector is generally used for themotion compensation. In the above-mentioned VM3.0, the intra-frameencoding and the inter-frame encoding are adaptively switched each otherblock by block, and the motion compensation similar as in MPEG1/2 iscarried out, whereby the efficiency of encoding is improved.

As described above, when performing encoding to the image consisting ofthe shape information and the pixel value information, if the motioncompensation encoding of a shape information is carried out using themotion vector of the pixel value information for the shape informationto be used for the image synthesis, the efficiency of encoding isfurther improved than when the shape information is directly encoded.This is reported by ISO/IEC/JTC1/SC29/WG11 N1260 March 1996.

Further, when the motion detection and motion compensation are executed,it is considered that it is efficient that the shape information isseparated into the two-valued shape information component and themulti-valued information component, and the multi-valued informationcomponent as well as the pixel value information are subjected to thesame waveform encoding together, which has been actually practiced.

In the above-described prior art image encoding and the image decodingaccompanying to this, there exist the following problems.

Though MMR encoding is a representative one of the reversible(loss-less)encoding as described above, because of the reversibility, it isimpossible to largely improve the compression rate by allowing thevisually less-important picture-quality degradation.

In addition, MMR is an intra-frame encoding method, and does not takeinto account the improvement of the compression rate by utilizing theinter-frame correlation. In MMR and MMMR which a modified version ofMMR, only the difference between the change point of the currentscanning line and the change point of the immediately previous scanningline is utilized, and the redundancy by the correlation as a straightline in the vertical direction is not sufficiently removed. Accordingly,the encoding efficiency is good when the change of the pixel valuehappens along the scanning line, but the encoding efficiency is bad whenthe change of the pixel value does not happen along the scanning line.MMR and MMMR also includes the horizontal encoding mode which does notutilize the correlation in the vertical direction at all in order toencode the pixels which can not be encoded as the difference of thechange point of the immediately previous scanning line. This horizontalencoding mode has a room for further improving the efficiency with theuse of the correlation in the vertical direction.

Further, in the prior art MMR and MMMR, the hierarchical imagereproduction by decoding part of bit stream is impossible. The othermethods in which the hierarchical image reproduction is possible have nogood encoding efficiency and have demerit of increasing the encoding bitnumber. Accordingly, there exists no encoding method which enables theeffective hierarchical image reproduction.

Further, when encoding the image consisting of shape information andimage information by the motion compensation, the shape information ismotion-compensated using the same motion vector as that for the imageinformation in the prior art. However, similarly as that, if a sphererotates, the figure drawn on the sphere moves, though the shape of thesphere does not change, the motion vector of the image information isnot identical to that of the shape information. Therefore, in such acase no good encoding is carried out, which is a problem in the priorart encoding method.

Furthermore, while in VM3.0, there is a method which tries to improvethe encoding efficiency by adaptively switching the intra-frame encodingand the inter-frame encoding block by block as described, the judgmentagainst intra-frame/inter-frame encoding is based on the pixel valueinformation similarly as in the adaptive switching in MPEG1/2, so thatit is difficult to appropriately and efficiently encode the shapeinformation which is largely different from the pixel value informationin its nature.

In the light of the above-described respects, this invention is proposedand an object of this invention is to provide an image encodingapparatus, an image encoding method and an image encoding programrecording medium, all of which can encode image signals efficiently.Also, another object of this invention is to provide an image decodingapparatus, an image decoding method and an image decoding programrecording medium, all of which can appropriately decode theabove-mentioned encoded signal encoded effectively.

DISCLOSURE OF THE INVENTION

In order to achieve the above-mentioned objects, a 1st aspect of thisinvention provides an image encoding apparatus which receives two-valuedimage signals as input signals and encodes pixels of the input signalschanging the pixel values, comprising:

change pixel detection means for detecting the pixels changing the pixelvalues and outputting the result as the detected change pixels;

prediction means for predicting change pixels of the input signals basedon the pixels changing the pixel values of already encoded and decodedpixels and outputting the result as predicted pixels;

difference value calculation means for calculating from the detectedchange pixels and the predicted change pixels the differencetherebetween and outputting the same as difference values D;

rounding means for selecting D′ which is in the range determined basedon the given tolerance value and the difference value D and which hasthe minimum code length when it should be encoded and outputting it asmodified difference value;

decoding means for decoding the two-valued image signal from themodified difference values D′ and the predicted change pixels; hand

encoding means for encoding the modified difference values D′,

whereby the image encoding apparatus selects modified difference valueswhich cause the code length of the error(difference value) to become theminimum in the prediction error equal to or smaller than the tolerancevalue and outputs this, resulting in reducing the bit number which isrequired for encoding.

A 2nd aspect of this invention provides an image encoding apparatusaccording to which receives two-valued image signals as input signalsand encodes pixels of the input signals changing the pixel values,comprising:

change pixel detection means for detecting the pixels changing the pixelvalues and outputting the result as the detected change pixels;

1st prediction means for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels in the frames and outputting the result as 1st predictedpixels;

1st difference value calculation means for calculating from the detectedchange pixels and the 1st predicted change pixels the differencestherebetween and outputting the same as 1st difference values D;

2nd prediction means for predicting change pixels of the input signals,along with the motion compensation, based on the pixels changing thepixel values of already encoded and decoded pixels in reference framesand outputting the result as 2nd predicted pixels;

2nd difference value calculation means for calculating the differencesbetween the detected change pixels and the 2nd predicted change pixelsand outputting the same as 2nd difference values D′;

mode selection means for calculating the code lengths of the first andsecond difference values D′ and D′ when respectively encoded, selectingthe value having the shorter code length by comparing the calculatedresults, and outputting “the first” or “the second”, depending on theselection, as an encoding mode; and

encoding means for encoding the selected first or second differencevalues D′ or D″, and the encoded mode output by the mode selectionmeans,

whereby the image encoding apparatus can select a signal which shouldhave the minimum code-length by comparing the prediction based on theframe and the prediction based on the motion-compensated reference frameto output an encoded signal, resulting in reduced bit number requiredfor encoding by the utilization of the inter-frame pixel correlation.

A 3rd aspect of this invention provides an image encoding apparatuswhich receives two-dimensional two-valued image signals as input signalsand encodes pixels of the input signals changing the pixel values,comprising:

change pixel detection means for detecting the pixels changing the pixelvalues and outputting the result as the detected change pixels;

1st prediction means for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels by horizontally scanning the image signals and outputtingthe result as 1st predicted pixels;

1st difference value calculation means for calculating the differencesbetween the detected change pixels and the 1st predicted pixels andoutputting the same as 1st difference values D;

2nd prediction means for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels by scanning the image signals in the vertical directionand outputting the result as 2nd predicted pixels;

2nd difference value calculation means for calculating the differencesbetween the detected change pixels and the 2nd predicted pixels andoutputting the same as 2nd difference values mode selection means forcalculating the code lengths of the first and second difference valuesD′ and D′ when respectively encoded, selecting the value having theshorter code length by comparing the calculated results, and outputting“the first” or “the second” depending on the selection as an encodingmode; and

encoding means for encoding the selected first or second differencevalues D′ or D″, and the encoded mode output by the mode selectionmeans,

whereby the image encoding apparatus can select a signal which shouldhave the minimum code-length by comparing the prediction by thehorizontal scanning and the prediction by the vertical scanning tooutput an encoded signal, resulting in reducing the bit number requiredfor encoding by the utilization of local changes in the horizontalcorrelation and the vertical correlation of the image.

A 4th aspect of this invention provides an image encoding apparatuswhich receives multi-valued image signals as input signals and encodespixels of the input signals changing the pixel values, comprising:

change pixel detection means for detecting the pixels changing the pixelvalues to a value above the given value and outputting the result as thedetected change pixels;

prediction means for predicting change pixels of the input signals basedon the pixels changing the pixel values of already encoded and decodedpixels and outputting the result as predicted pixels;

difference value calculation means for calculating the differencebetween the detected change pixels and the predicted pixels andoutputting the same as a difference value D;

encoding means for encoding the difference values D and the pixel valuesof the detected change pixel; and

decoding means for decoding the multi-valued image signal from thedifference values D and the pixel values of the detected change pixel,

whereby the image encoding apparatus can judge the position where thechange of the pixel values is equal to or larger the threshold as thechange position, and enables encoding of not only two-valued image butalso multi-valued image.

A 5th aspect of this invention provides an image encoding apparatus,which receives a transparency signal indicating the ratio for the imagesynthesis and a pixel value signal as input signals, and encodes theinput signal referring to a reference image, comprising:

1st motion vector detection means for detecting motion vectors of thepixel value signal by comparing the pixel value signal of the inputsignal and the pixel value signal of the reference image;

1st motion compensation means for motion-compensating the pixel valuesignal of the reference image using the motion vectors of the pixelvalue signal, and outputting a compensated pixel value signal;

1st difference value calculation means for calculating from the pixelvalue signal of the input signal and the compensated pixel value signalthe difference therebetween, and outputting the same as 1st differencevalues;

1st encoding means for encoding the 1st difference values;

2nd motion vector detection means for detecting motion vectors of thetransparency signal by comparing the transparency signal of the inputsignal and the transparency signal of the reference image;

2nd motion compensation means for motion-compensating the transparencysignal of the reference image using the motion vectors of thetransparency signal, and outputting the same as a compensatedtransparency signal;

2nd difference value calculation means for calculating from thetransparency signal of the input signal and the compensated transparencysignal the difference therebetween, and outputting the same as 2nddifference values;

2nd encoding means for encoding the 2nd difference values; and

3rd encoding means for encoding the motion vectors of the pixel valuesignal and the motion vectors of the transparency signal,

whereby the image coding apparatus motion-compensates the transparencysignal using the motion vectors which are detected apart from the motionvectors of the pixel value signal and thereby approximates the inputtransparency signal with good precision by the motion compensationsignal, resulting in reduced motion compensation error and improvedencoding efficiency.

A 6th aspect of this invention provides an image encoding apparatusaccording to claim 5 wherein the 2nd motion vector detection meansdetects the motion vectors of the transparency signal by comparing thetransparency signal of the input signal and the transparency signal ofthe reference image in the vicinity of the motion vectors detected bythe 1st motion vector detection means,

whereby the motion vectors of the transparency signal are detected onlyin the vicinity of the motion vectors of the pixel value signal,resulting in reduced calculation times required for detecting motionvectors, compared to the case where the calculation is performedindependently of the pixel value signal.

A 7th aspect of this invention provides an image encoding apparatusaccording to claim 5 wherein the 1st motion vector detection meansdetects the motion vectors of the pixel value signal by comparing thepixel value signal of the input signal and the pixel value signal of thereference image in the vicinity of the motion vectors detected by the2nd motion vector detection means,

whereby the motion vectors of the pixel value signal are detected onlyin the vicinity of the motion vectors of the corresponding signal,resulting in reduced calculation times required for detecting motionvectors, compared to the case that the calculation is independent of thetransparency signal.

An 8th aspect of this invention provides an image encoding apparatusaccording to claim 5 wherein the 3rd encoding means encodes the motionvectors of the pixel value signal and the differences between the motionvectors of the transparency signal and the motion vectors of the pixelvalue signal,

whereby the difference vector of the motion vectors having correlationis coded and thereby the occurrence frequency of the difference vectorsconcentrates on in the vicinity of 0 vectors, and therefore thevariable-length encoding improves the encoding efficiency and theencoding can be carried out with less bit number.

A 9th aspect of this invention provides an image encoding apparatusaccording to claim 5 wherein the 3rd encoding means encodes the motionvectors of the transparency signal and the difference between the motionvectors of the transparency signal and the motion vectors of the pixelvalue signal,

whereby the difference vector of the motion vectors having correlationis coded and thereby the occurrence frequency of the difference vectorsconcentrates on in the vicinity of 0 vectors, and therefore thevariable-length encoding improves the encoding efficiency and theencoding can be carried out with less bit number.

A 10th aspect of this invention provides an image encoding apparatus,which receives image signals with blocked shapes consisting of shapesignals indicating the shapes of objects and whether the pixel value ofpixels are significant or not and pixel value signals as input signals,and encodes the input signals referring to reference images, comprising:

1st motion vector detection means for detecting motion vectors of thepixel value signal by comparing the pixel value signal of the inputsignal and the pixel value signal of the reference image;

1st motion compensation means for motion-compensating the pixel valuesignal of the reference image using the motion vectors of the pixelvalue signal, and outputting the same as a compensated pixel valuesignal;

1st difference value calculation means for calculating from the pixelvalue signal of the input signal and the compensated pixel value signalthe difference therebetween, and outputting the same as 1st differencevalues;

1st encoding means for encoding the 1st difference values;

2nd motion vector detection means for detecting motion vectors of theshape signal by comparing the shape signal of the input signal and theshape signal of the reference image;

2nd motion compensation means for motion-compensating the shape signalof the reference image using the motion vectors of the shape signal, andoutputting the same as a compensated shape signal;

2nd difference value calculation means for calculating from the shapesignal of the input signal and the compensated shape signal thedifference therebetween, and outputting the same as 2nd differencevalues;

2nd encoding means for encoding the 2nd difference values; and

3rd encoding means for encoding the motion vectors of the pixel valuesignal and the motion vectors of the shape signal,

whereby the encoding efficiency is improved as well as the motioncompensation errors are further reduced by using appropriate signalswhich are encoded and decoded as reference images and to which themotion compensation values are added.

A 11th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein the 2nd motion vector detection meansdetects the motion vectors of the shape signal by comparing the shapesignal of the input signal and the shape signal of the reference imagein the vicinity of the motion vectors detected by the 1st motion vectordetection means,

whereby the calculation times of the motion detection are reduced.

A 12th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein the 1st motion vector detection meansdetects the motion vectors of the pixel value signal by comparing thepixel value signal of the input signal and the pixel value signal of thereference image in the vicinity of the motion vectors detected by the2nd motion vector detection means,

whereby because of the result of the motion detection in thetransparency signal is used in the motion detection of the pixel valuesignal, the calculation times of the motion detecting are reduced.

A 13th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein the 3rd encoding means encodes the motionvectors of the pixel value signal and the difference values between themotion vectors of the shape signal and the motion vectors of the pixelvalue signal,

whereby because the difference vectors between the motion vectors of thepixel value signal and the motion vectors of the shape signal areencoded instead of the motion vectors of the shape signal being encoded,the variable-length encoding enables further improvement in the encodingefficiency.

A 14th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein the 3rd encoding means encodes the motionvectors of the shape signal and the difference values between the motionvectors of the shape signal and the motion vectors of the pixel valuesignal,

whereby because the difference vectors between the motion vectors of theshape signal and the motion vectors of the pixel value signal areencoded instead of the motion vectors of the pixel value signal beingencoded, the variable-length encoding enables further improvement in theencoding efficiency.

A 15th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein,

when the shape signal of the input signal indicates that all pixelvalues are significant, and the compensated shape signal which ismotion-compensated for the shape signal of the reference image using themotion vectors of the pixel value signal detected by the 1st motionvector detection means, indicates that all pixel values are significant,or

when the shape signal of the input signal indicates that all pixelvalues are insignificant, and the compensated shape signal which ismotion-compensated for the shape signal of the reference image using themotion vectors of the pixel value signal detected by the 1st motionvector detection means, indicates that all pixel values areinsignificant,

the 2nd vector detection means does not detect the motion vectors of theshape signal, and

the motion vectors of the pixel value signal detected by the 1st vectordetection means is used as the motion vectors of the shape signal,

whereby the motion detection of the shape signal when the necessity istherefore low is not performed, resulting in reduced processing load.

A 16th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein,

when the compensated shape signal which is motion-compensated for theshape signal of the reference image using the motion vectors of thepixel value signal detected by the 1st motion vector detection means iscompared to the shape signal of the input signal and the resultingdifference is lower than the given tolerance value,

the 1st vector detecting means does not detect the motion vector of thepixel value signal but the motion vectors of the shape signal detectedby the 2nd vector detection means is used as the motion vectors of thepixel value signal,

whereby the motion detection of the shape signal when the necessity istherefore low is not performed, resulting in reduced processing load.

A 17th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein,

when the motion vectors of the shape signal have been encoded from theimmediately previous encoded input signal, the 3rd encoding meansencodes the difference values between the immediately previous encodedmotion vectors of the shape signal and the motion vectors of the shapesignal detected from the input signal when the motion vector of theshape signal of the input signal is encoded in the immediately previousencoded input signal. That is, when the immediately previous motionvectors of the shape signal have been encoded, the difference vectorsbetween the motion vectors and the detected motion vectors are obtainedand encoded,

whereby it is possible to improve the encoding efficiency using themotion vectors between shape signals having high correlation.

An 18th aspect of this invention provides an image encoding apparatusaccording to claim 10 wherein,

when the immediately previous motion vectors of the pixel value signalof the input signal have been encoded, the 3rd encoding means encodesthe difference values between the motion vectors of the immediatelyprevious encoded pixel value signal and the motion vectors of the pixelvalue signal detected from the input signal. That is, when theimmediately previous motion vectors of the pixel value signal have beenencoded, the difference vectors between the motion vectors and thedetected motion vectors are obtained and encoded,

whereby it is possible to improve the encoding efficiency usingdifferences of the motion vectors between pixel value signals havinghigh correlation.

A 19th aspect of this invention provides an image encoding apparatusaccording to any of claims 10 to 18 wherein,

when the input signal consists of the transparency informationindicating the synthesis ratio for synthesizing a plurality of images,and the image information, as the transparency information regarded isthe shape signal and as the image information regarded is the pixelvalue signal,

whereby it is possible to improve the encoding efficiency for imagesignal including transparency information.

A 20th aspect of this invention provides an image encoding apparatusaccording to any of claims 10 to 18 wherein,

when the input signal consists of the transparency informationindicating the synthesis ratio for synthesizing a plurality of imagesand the image information, the transparency information is separatedinto the two-valued signal representing only the shape and the otherremaining signal, and then the two-valued signal is regarded as theabove shape signal, and the separated remaining shape signal and theimage information are regarded as the pixel value signal,

whereby it is possible to improve the encoding efficiency for imagesignals including transparency information.

A 21st aspect of this invention provides an image encoding apparatuswhich receives the image signal which consists of at least either theshape information indicating whether pixel values of respective pixelsof an object are significant or not, or the transparency informationindicating the synthesis ratio for respective pixels of the object, andof the image information, as input image signal, comprising:

blocking means for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding means for selecting an encoding mode from the given set ofencoding modes for each piece of shape information formed into blocks bythe blocking means, the transparency information and the pixel valueinformation, and encoding each piece of information in each selectedencoding mode;

2nd encoding means for collectively encoding all mode-identifyinginformation each of which indicates the selected mode for each piece ofshape information, the transparency information and the pixel valueinformation; and

the output of the 1st encoding means and the output of the 2nd encodingmeans being output as coded outputs;

whereby because all the high-correlated shape information, transparencyinformation and pixel value information are collectively encoded, thevariable-length encoding which produces codes having short code lengthsfor the codes being the same modes makes it possible to reduce the bitnumber of the encoded mode signal.

A 22nd aspect of this invention provides an image encoding apparatuswhich receives the image signal which consists of at least either theshape information indicating whether or not pixel values of respectivepixels of an object are significant, or the transparency informationindicating the synthesis ratio for respective pixels of the object, andthe pixel value information, as input image signal, comprising:

blocking means for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding means for selecting an encoding mode from the given set ofencoding modes for each piece of shape information formed into blocks bythe blocking means and the transparency information, and encoding eachpiece of information in each selected encoding mode;

2nd encoding means for encoding the pixel value information which isblocked by the blocking means in either of the encoding modes selectedby the 1st encoding means; and

3rd encoding means for collectively encoding all mode-identifyinginformation each of which indicates the selected mode for each piece ofshape information, the transparency information and the pixel valueinformation,

whereby the selected modes are likely to become identical each other,the outputs of the 1st, 2nd and 3rd encoding means being output as theencoded output, and the variable-length encoding makes it possible toreduce the bit number of the encoded mode signal to a further extent.

A 23rd aspect of this invention provides an image encoding apparatuswhich receives the image signal which consists of at least either theshape information indicating whether or not pixel values of respectivepixels of an object are significant, or the transparency informationindicating the synthesis ratio for respective pixels of the object asthe input image information, and the pixel value information, as inputimage signal, comprising:

blocking means for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding means for selecting an encoding mode from the given set ofencoding modes for each piece of pixel value information formed intoblocks by the blocking means, and encoding each piece of information ineach selected encoding mode;

2nd encoding means for encoding the shape information and thetransparency information formed into blocks by the blocking means; and

3rd encoding means for collectively encoding all mode-identifyinginformation each of which indicates the selected mode for the shapeinformation, the transparency information and the pixel valueinformation,

whereby because the selected modes are is likely to become identicaleach other, the outputs of the 1st, 2nd and 3rd encoding means beingoutput as the encoded output, the variable-length encoding makes itpossible to further reduce the bit number of the encoded mode signal.

A 24th aspect of this invention provides an image encoding apparatusaccording to any of claims 21 to 23 wherein,

the given encoding modes are the intra-frame encoding and theinter-frame encoding,

whereby the encoding based on the correlation of the image signal isperformed, and thereby reduction in the bit number of the encoded modesignal is enabled.

A 25th aspect of this invention provides an image encoding apparatusaccording to any of claims 21 to 23 wherein,

the 2nd encoding means selects the intra-frame encoding when theselected encoding mode is the intra-frame encoding mode in the 1stencoding means,

whereby the encoding based on the correlation of the image signal isperformed using the same modes, and the reduction in the bit number ofthe encoded mode signal is enabled.

A 26th aspect of this invention provides an image encoding apparatusaccording to any of claims 21 to 23 wherein,

the given encoding modes are the number of motion vectors of each of theblocks,

whereby the encoding corresponding to the nature of the image signal isperformed, and the reduction in the bit number of the encoded modesignal is enabled.

A 27th aspect of this invention provides an image encoding apparatusaccording to any of claims 22 to 23 wherein,

the 2nd encoding means selects the number of motion vectors of each ofthe blocks which is the encoding mode selected in the 1st encoding meansas the encoding mode,

whereby the encoding corresponding to the nature of the image signal isperformed using the same modes, and a further reduction in the bitnumber of the encoded mode signal is enabled.

A 28th aspect of this invention provides an image encoding apparatusaccording to any of claims 21 to 23 wherein,

the given encoding modes are the changing of the quantizing step and thenon-changing of the quantizing step,

whereby the encoding corresponding to the nature of the image signal isperformed, and the reduction in the bit number of the encoded modesignal is enabled.

A 29th aspect of this invention provides an image encoding apparatusaccording to any of claims 22 to 23 wherein,

the 2nd encoding means selects the non-changing of the quantizing stepwhen the 1st encoding means selects the non-changing of the quantizingstep,

whereby the encoding corresponding to the nature of the image signal isperformed, and the reduction in the bit number of the encoded modesignal is enabled.

A 30th aspect of this invention provides an image encoding apparatuswhich receives two-dimensional image signals consisting of a pluralityof pixels as input signals and encodes the image signals, comprising:

1st change pixel detection means for detecting the pixels changing thepixel values by scanning in the given direction on the two-dimensionalimage signal and outputting the result as the detected 1st changepixels;

2nd change pixel detection means for detecting the pixels changing thepixel values by scanning in the given direction on the already encodedand decoded pixels and outputting the result as the detected 2nd changepixels;

3rd change pixel detection means for detecting the pixels changing thepixel values by scanning in the given direction on the already encodedand decoded pixels and outputting the result as the detected 3rd changepixels;

change pixel prediction means for predicting the 1st change pixels basedon the 1st and 2nd change pixels and outputting the result as predictedchange pixels;

prediction error calculation means for calculating the differencesbetween the detected 1st change pixels and predicted change pixels, andoutputting difference values of change pixels; and

prediction error encoding means for encoding the difference values ofchange pixels,

whereby the error concerning the prediction is encoded and theimprovement in the encoding efficiency is enabled.

A 31st aspect of this invention provides an image encoding apparatusaccording to claim 30 wherein,

the 2nd change pixel detection means and the 3rd change pixel detectionmeans makes the pixel values of the 2nd change pixel and

the 3rd change pixel equal to that of the 1st change pixel,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 32nd aspect of this invention provides an image encoding apparatusaccording to claim 30 wherein,

the 2nd change pixel detection means and the 3rd change pixel detectionmeans use the same given scanning direction as the given scanningdirection of the 1st change pixel detection means,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 33rd aspect of this invention provides an image encoding apparatusaccording to claim 30 wherein,

the 3rd change pixel is encoded by the difference with the change pixelwhich is predicted using the 2nd change pixel,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 34th aspect of this invention provides an image encoding apparatusaccording to claim 30 wherein,

it is assumed that the 2nd change pixel, 3rd change pixel and 1st changepixel should be on different scanning lines,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 35th aspect of this invention provides an image encoding apparatusaccording to claim 30 wherein,

when the 2nd change pixel is the x-th pixel on the m-th scanning lineand the 3rd change pixel is the y-th pixel on the n-th scanning line,the change pixel prediction means predicts that the 1st change pixelshould be the y−(x−y)+(n−k)/(m−n)-th pixel on the k-th scanning line,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 36th aspect of this invention provides an image encoding apparatuswhich receives two-dimensional image signals consisting of a pluralityof pixels as input signals and encodes the image signals, comprising:

change pixel detection means for detecting the pixels changing the pixelvalues by scanning the two-dimensional image signal in the givendirection to output the result as the detected change pixels;

change pixel prediction means for predicting change pixels based onencoded and decoded pixels and outputting the result as predicted changepixels;

prediction error calculation means for calculating the differencesbetween the detected change pixels and the predicted change pixels, andoutputting difference values of change pixels;

prediction error encoding means for encoding the difference value ofchange pixels and outputting it as a difference value encoded signal,when the difference value of change pixels is less than the given value;and

pixel number encoding means for calculating the number of the pixelswhich are positioned between the immediately previous encoded changepixel and the detected change pixel and are not positioned at the pixelposition which the prediction error encoding means can encode, andencoding the calculated pixel number, and outputting the pixel numberencoded signal, when the difference value of changed pixels is equal toor larger than the given value,

the prediction error encoding means and the pixel number encoding meansperforming encodings in which the encoded signal and the pixel numberencoded signal are uniquely identifiable thereby to output theprediction error encoded signal when the prediction error is within thegiven range and to output the pixel number encoded signal when theprediction error is beyond the given range as the output encoded signal,

whereby when the prediction error is large, the appropriate encoding iscarried out, averting the reduction in the encoding efficiency even whenthe prediction error is so large that the variation in the number of thechange pixels unables the prediction of the change pixel.

A 37th aspect of this invention provides an image encoding apparatusaccording to claim 36 wherein,

in the prediction error encoding means and the pixel number encodingmeans, the given value which is to be compared with the difference valueof the change pixels is set using the pixel number of the scanning line,

whereby the above-described encoding is performed and theabove-described effect is obtained.

A 38th aspect of this invention provides an image encoding apparatuswhich receives two-dimensional shape signals indicating the area wherethe pixels representing an object exist as input and encodes the shapesignals, comprising:

significant area extracting means for extracting the significant areawhich contains the pixels representing an object from the shape signalto output a significant area range representing the range covering theextracted significant area;

blocking means for dividing the shape signal into blocks having aplurality of pixels;

shape encoding means for judging whether the blocks output by theblocking means contain the significant area each by each, and encodingat least the significant area of the block to output a shape encodedsignal when it is judged that the block contains the significant area;and

the significant area range and the shape encoded signal being made asencoded signal, thereby the range of the significant area is detectedand the block size of the shape signal is changed so that only theinside of the significant area of the shape signal is encoded;

whereby the encoding is not performed beyond the range of thesignificant area, resulting in improved encoding efficiency of the shapesignal.

A 39th aspect of this invention provides an image encoding apparatusaccording to claim 38 wherein,

the shape encoding means extracts the minimum rectangular areacontaining the significant area from the blocks produced by the blockingmeans, and encodes only the inside of the extracted rectangular area,

whereby the above-described encoding is performed and the encodingefficiency is obtained.

A 40th aspect of this invention provides an image encoding apparatuswhich receives two-dimensional image signals consisting of a pluralityof pixels as input signals and encodes the two-dimensional imagesignals, comprising:

image signal separation means for separating the image signal into atleast 2 image signals, and outputting the separated image signals as twoor more partial image signals;

1st image signal encoding means for selecting at least one of thepartial image signals as target partial image signals and encoding theselected target partial image signal and outputting the result as 1stencoded signal;

prediction probability calculating means for predicting the non-targetpartial image signals which are the partial image signal other than thetarget partial image signal, and calculating the probability that theprediction comes true, and outputting the calculated predictionprobability; and

2nd image signal encoding means for determining the degree of priorityof decoding based on the prediction probability calculated by theprediction probability calculation means, and encoding the non-targetpartial image signal using the encoding method based on the determineddegree of priority,

whereby the smaller prediction probability pixels are encoded withpriority, thereby making it possible to realize a hierarchical encodinghaving little picture-quality degradation without any additionalinformation.

A 41st aspect of this invention provides an image encoding apparatusaccording to claim 40 wherein,

the 2nd image signal encoding means determines the degree of priority ofdecoding so that the small prediction probability pixels are encodedwith priority,

whereby the above-described encoding is performed and the encodingefficiency is obtained.

A 42nd aspect of this invention provides an image encoding apparatusaccording to claim 40 wherein,

the prediction probability calculating means makes the coming-trueprobability be large when the pixel values of the neighbor pixels havethe same value, while makes the coming-true probability be small whenthe pixel values of the neighbor pixels do not have the same value,

whereby the above-described encoding is performed and the encodingefficiency is obtained.

A 43rd aspect of this invention provides an image decoding apparatuswhich receives the encoded signals and decodes the same, comprising:

decoding means for decoding the encoded signal to obtain the encodedmode and the difference value, and outputting the obtained encoding modeas a mode signal and the obtained difference value as a decodeddifference value;

1st prediction means for predicting the change pixel of the input signalbased on the pixel changing the pixel value among the already encodedand decoded pixels in the frame, and outputting the predicted pixels as1st predicted pixels;

2nd prediction means for predicting the change pixel of the inputsignal, with the motion compensation, based on the pixel changing thepixel value among the already encoded and decoded pixels in thereference frame, and outputting the predicted pixels as 2nd predictedpixels;

addition means for adding the decoded difference value to the 1stpredicted pixel when the mode signal indicates the prediction of theparticular frame, and adding the decoded difference value to the 2ndpredicted pixel when the mode signal indicates the prediction ofreference frame; and

the output of the addition means being made the change pixel;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 2 can be appropriately decoded.

A 44th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same, comprising:

decoding means for decoding the encoded signal to obtain the encodedmode and the difference value, and outputting the obtained encoding modeas a mode signal and the obtained difference value as a decodeddifference value;

1st prediction means for predicting the change pixel of the inputsignal, based on the pixel changing the pixel value among the alreadyencoded and decoded pixels, by horizontally scanning the image signal,and outputting the predicted pixels as 1st predicted pixels;

2nd prediction means for predicting the change pixel of the inputsignal, with the motion compensation, based on the pixel changing thepixel value among the already encoded and decoded pixels, by scanningthe image signal in the vertical direction, and outputting the predictedpixels as 2nd predicted pixels;

addition means for adding the decoded difference value to the 1stpredicted pixel when the mode signal indicates the prediction by thehorizontal scanning, and adding the decoded difference value to the 2ndpredicted pixel when the mode signal indicates the prediction by thevertical scanning; and

the output of the addition means being made the change pixel;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 3 can be appropriately decoded.

A 45th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same, comprising:

decoding means for decoding the encoded signal, obtaining the differencevalue and the pixel value of the change pixel, and outputting theobtained difference value as a decoded difference value and the obtainedchange pixel as decoded pixel;

prediction means for predicting the change pixel of the input encodedsignal, based on the pixel changing the pixel value among the alreadydecoded pixels, and outputting the predicted pixels as predicted pixels;

addition means for adding the decoded difference value to the predictedpixel and outputting the calculated result as a modified differencevalue; and

image decoding means for obtaining multi-valued signals by a decodingprocess from the modified difference values and the decoded pixelvalues,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 4 can be appropriately decoded.

A 46th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same, comprising:

1st decoding means for decoding the encoded signal to obtain thedifference value of the pixel value signal, and outputting the obtaineddifference value as a decoded pixel value difference value;

2nd decoding means for decoding the encoded signal to obtain thedifference value of the transparency signal, and outputting the obtaineddifference value as a decoded transparency difference value;

3rd decoding means for decoding the encoded signal to obtain the motionvectors of the pixel value signal and the motion vectors of thetransparency signal, and outputting the decoded pixel value motionvectors and the decoded pixel value motion vectors;

1st motion compensation means for compensating the pixel value signal ofa reference image described below using the encoded pixel value motionvectors, and outputting the result of the motion compensation as acompensated pixel value signal;

1st addition means for adding the decoded pixel value difference valueand the compensated pixel value signal to output the result of theaddition as a decoded pixel value signal as well as a pixel value of areference image;

2nd motion compensation means for compensating the transparency signalof a reference image described-below using the decoded transparencymotion vectors, and outputting the result of the motion compensation asa compensated transparency signal; and

2nd addition means for adding the decoded transparency difference valueand compensated transparency signal, and outputting the result of theaddition as a decoded transparency signal as well as a transparencysignal of a reference image;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 5 can be appropriately decoded.

A 47th aspect of this invention provides an image decoding apparatusaccording to claim 46 wherein,

the 3rd decoding means decodes the motion vector of the pixel valuesignal and the difference value of the motion vectors to obtain thedecoded pixel value motion vectors and the decoded motion vectordifference values, and adding the decoded pixel value motion vectors andthe decoded motion vector difference values, and making the result ofthe addition be the encoded transparency motion vectors,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 7 can be appropriately decoded.

A 48th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same, comprising:

1st decoding means for decoding the encoded signal to obtain thedifference value of the pixel value signal, and outputting the obtaineddifference value as a decoded pixel value difference value;

2nd decoding means for decoding the encoded signal to obtain thedifference value of the shape signal, and outputting the obtaineddifference value as a decoded shape difference value;

3rd decoding means for decoding the encoded signal to obtain the motionvectors of the pixel value signal and the motion vectors of the shapesignal, and outputting the decoded pixel value motion vectors and thedecoded shape motion vectors;

1st motion compensation means for compensating the pixel value signal ofa reference image described below using the encoded pixel value motionvectors, and outputting the result of the motion compensation as acompensated pixel value signal;

1st addition means for adding the decoded pixel value difference valueand the compensated pixel value signal, and outputting the result of theaddition as a decoded pixel value signal as well as a pixel value signalof a reference image;

2nd motion compensation means for compensating the shape signal of areference image described below using the decoded shape motion vectors,and outputting the result of the motion compensation as a compensatedshape signal; and

2nd addition means for adding the decoded shape difference value and thecompensated shape signal, and outputting the result of the addition as adecoded shape signal as well as a shape signal of a reference image,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 10 can be appropriately decoded.

An image decoding apparatus according to a 49th aspect of this inventionis an image decoding apparatus according to claim 48 wherein,

the 3rd decoding means decodes the motion vector of the pixel valuesignal and the difference value of the motion vectors to obtain thedecoded pixel value motion vectors and the decoded motion vectordifference values, and adding the decoded pixel value motion vectors andthe decoded motion vector difference values, and making the result ofthe addition be the encoded shape motion vectors,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 13 can be appropriately decoded.

A 50th aspect of this invention provides an image decoding apparatusaccording to claim 48 wherein,

the 3rd decoding means decodes the motion vector of the shape signal andthe difference value of the motion vectors to obtain the decoded shapemotion vectors and the decoded motion vector difference values, andadding the decoded shape motion vectors and the decoded motion vectordifference values, and making the result of the addition be the encodedpixel value motion vectors,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 14 can be appropriately obtained.

A 51st aspect of this invention provides an image decoding apparatusaccording to claim 48 wherein,

when the input signal is one which is obtained by encoding thedifference value between the immediately previous encoded motion vectorsof the shape signal and the motion vectors of the shape signal detectedfrom the input signal, the 3rd decoding means decodes the differencevalue, and adds the decoded difference value to the immediately previousdecoded motion vector of the shape signal to obtain the shape motionvector,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 17 can be appropriately obtained.

A 52nd aspect of this invention provides an image decoding apparatusaccording to claim 48 wherein,

when the input signal is one which is obtained by encoding thedifference value between the immediately previous encoded motion vectorof the pixel value signal and the motion vector of the pixel valuesignal detected from the input signal, the 3rd decoding means decodesthe difference value, and adds the decoded difference value to theimmediately previous decoded motion vector of the pixel value signal tooutput the decoded pixel value motion vector,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 18 can be appropriately decoded.

A 53rd aspect of this invention provides an image decoding apparatusaccording to any of claims 48 to 52 wherein,

when the input signal is one consisting of the transparency informationindicating the synthesis ratio for synthesizing a plurality of images,and the image information, the decoded shape signal is made thetransparency information and the decoded pixel value signal is made theimage information,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 19 can be appropriately decoded.

A 54th aspect of this invention provides an image decoding apparatusaccording to any of claims 48 to 52 wherein,

when the input signal is an encoded signal created from an image signalwhich consists of the transparency information indicating the synthesisratio for synthesizing a plurality of images, and the image information,the transparency information of which is separated into the two-valuedsignal representing only the shape and the other remaining shape signal,then, the two-valued signal is made the shape signal, and the separatedremaining shape signal and image information are made the pixel valuesignal to be encoded, the decoded shape signal is made the two-valuedsignal of the transparency information, and the decoded pixel valuesignal and the image information are made the remaining shape signal ofthe transparency information,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 20 can be appropriately decoded.

A 55th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same, comprising:

1st decoding means for decoding the input encoded signal to obtain themode identifying information indicating each encoding mode of the shapeinformation, the transparency information and the pixel valueinformation;

2nd decoding means for decoding, according to the obtained modeidentifying information, the blocked shape information, transparencyinformation and pixel value information; and

reverse blocking means for integrating the blocked shape information,transparency information and pixel value information output by the 2nddecoding means to output the decoded image signals,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 21 can be appropriately decoded.

A 56th aspect of this invention provides an image decoding apparatusaccording to claim 55 wherein,

the mode identifying information indicates the intra-frame encoding andthe inter-frame encoding as encoding modes,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 24 can be appropriately decoded.

A 57th aspect of this invention provides an image decoding apparatusaccording to claim 55 wherein,

the mode identifying information indicates the number of motion vectorsof each of the blocks as encoding modes,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 26 can be appropriately decoded.

A 58th aspect of this invention provides an image decoding apparatuswherein,

the mode identifying information indicates the changing and non-changingof the quantizing step as encoding modes,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 28 can be appropriately decoded.

A 59th aspect of this invention provides an image decoding apparatuswhich receives the two-dimensional image signals consisting of aplurality of pixels as input encoded signals and decoded the same tooutput, comprising:

2nd change pixel detection means for detecting the pixels changing thepixel values by scanning the already decoded pixels in the givendirection to output the result as the detected 2nd change pixels;

3rd change pixel detection means for detecting the pixels changing thepixel values by scanning the already decoded pixels in the givendirection to output the result as the detected 3rd change pixels;

change pixel prediction means for predicting 1st change pixels describedbelow based on the 2nd and 3rd change pixels to output the result aspredicted change pixels;

prediction error decoding means for decoding the input encoded signalsto obtain the prediction error and outputting the obtained predictionerror;

1st change pixel decoding means for adding the predicted change pixeland the prediction error to output the result of the addition as a 1stchange pixel; and

pixel value decoding means for decoding the pixel values of theparticular pixels, assuming that there should be no pixels changingpixel values between the immediately previous decoded change pixel andthe 1st change pixel,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 30 can be appropriately decoded.

A 60th aspect of this invention provides an image decoding apparatusaccording to claim 59 wherein,

the 2nd change pixel detection means and the 3rd change pixel detectionmeans use those the same as that of the 1st change pixel, as the pixelvalues of the 2nd change pixel and the 3rd change pixel respectively,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 31 can be appropriately decoded.

A 61st aspect of this invention provides an image decoding apparatusaccording to claim 59 wherein,

the 2nd change pixel detection means and the 3rd change pixel detectionmeans use the same given scanning direction as the given scanningdirection of the 1st change pixels detection means,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 32 can be appropriately decoded.

A 62nd aspect of this invention provides an image decoding apparatusaccording to claim 59 wherein,

3rd change pixel is decoded by the difference with the change pixelwhich is predicted using the 2nd change pixel,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 33 can be decoded.

A 63rd aspect of this invention provides an image decoding apparatusaccording to claim 34 wherein,

it is assumed that the 2nd change pixel, the 3rd change pixel and the1st change pixel should be on different scanning lines,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 34 can be appropriately decoded.

A 64th aspect of this invention provides an image decoding apparatusaccording to claim 59 wherein,

when the 2nd change pixel is the x-th pixel on the m-th scanning lineand the 3rd change pixel is the y-th pixel on the n-th scanning line,the change pixel prediction means predicts that the 1st change pixelshould be the y−(x−y)+(n−k)/M−n)-th pixel on the k-th scanning line,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 35 can be appropriately decoded.

A 65th aspect of this invention provides an image decoding apparatuswhich receives the two-dimensional image signals consisting of aplurality of pixels as encoded input signals, and decodes the same tooutput, comprising:

change pixel detection means for detecting the pixels changing the pixelvalues by scanning the already decoded two-dimensional image signal inthe given direction to output the result as the detected change pixels;

change pixel prediction means for predicting change pixels on theparticular scanning line based on the detected change pixels andoutputting the result as predicted change pixels;

mode decoding means for decoding the input encoded signals and judgingwhether the input signal is the difference value encoded signal or pixelnumber encoded signal, and outputting the identifying signal;

prediction error decoding means for decoding the difference valueencoded signal and outputting the decoded prediction error when theidentifying signal indicates the difference value encoded signal;

1st change pixel decoding means for adding the predicted change pixeland the encoded prediction error, and outputting the result of theaddition as a 1st change pixel, when the identifying signal indicatesthe difference value encoded signal;

2nd change pixel decoding means for decoding the number of pixels whichshould be positioned from the immediately previous encoded change pixelto the detected change pixel, from the pixel number encoded signal toobtain the position of the change pixel on the basis of the number ofthe decoded pixels, and outputting the obtained result as the 2nddecoded change pixel, when the identifying signal indicates thedifference value signal;

change pixel selection means for selecting the 1st decoded change signalor the 2nd decoding change pixel according to the identifying signal;and

change pixel decoding means for decoding the pixel values, assuming thatthere should be no pixels changing pixel values between the immediatelyprevious decoded change pixel and the 1st change pixel;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 36 is appropriately decoded.

A 66th aspect of this invention provides an image decoding apparatuswherein,

the change pixel selection means performs the selection according to thepixel number on the particular scanning line,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 37 is appropriately obtained.

A 67th aspect of this invention provides an image decoding apparatuswhich receives encoded signals and decodes the same to outputtwo-dimensional shape signals representing the area where there existthe pixels representing an object, comprising:

significant area decoding means for decoding the encoded signals,obtaining rectangular areas where there exist the pixels representing anobject and outputting the obtained areas as significant areas;

shape decoding means for judging whether or not each of blocksconsisting of a plurality of pixels contains the significant area, andwhen judging that the block contains the significant area, encoding atleast the significant area of the particular block to output the decodedresult as decoded block shape signals; and

reverse blocking means for integrating the decoded block shape signalsto constitute a two-dimensional shape signal, and outputting thetwo-dimensional shape signal as a decoded signal,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 38 can be decoded.

A 68th aspect of this invention provides an image decoding apparatusaccording to claim 67 wherein,

the shape decoding means extracts the minimum rectangular areacontaining the significant area from the block for each block anddecoding only the inside of the extracted rectangular area,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 39 can be appropriately obtained.

A 69th aspect of this invention provides an image decoding apparatuswhich receives encoded signals, and decodes the same to outputtwo-dimensional image signals consisting of a plurality of pixels,comprising:

1st image signal decoding means for decoding the encoded signals tooutput 1st decoded signals;

image prediction means for predicting and outputting image signals whichhave not been decoded by the 1st image signal decoding means, based onthe image signals decoded by the 1st image signal decoding means;

prediction probability calculation means for calculating the probabilitythat the predicted image signal comes true to output the same;

2nd image signal decoding means for decoding the encoded signals whichare input with the degree of priority according to the predictionprobability calculated by the prediction probability calculation means;and

decoded signal integration means for integrating the outputs of the 1stimage signal decoding means and the 2nd image signal decoding means, andreplacing the image signal which is not decoded by any of the 1st imagesignal decoding means and the 2nd image signal decoding means, with theimage signal predicted by the image prediction means, and outputting theresult as a decoded image signal,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 40 can be appropriately decoded.

A 70th aspect of this invention provides an image decoding apparatusaccording to claim 69 wherein,

the 2nd image signal decoding means gives priority of the decoding ofthe pixel with the small prediction probability,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 41 can be appropriately decoded.

A 71st aspect of this invention provides an image decoding apparatusaccording to claim 69 wherein,

the prediction probability calculating means makes the coming-trueprobability large when the pixel values of the neighbor pixels have thesame value, while makes the coming-true probability small when the pixelvalues of the neighbor pixels have different values,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 42 can be appropriately decoded.

A 72nd aspect of this invention provides an image encoding method whichreceives two-valued image signals as input signals and encodes pixels ofthe input signals changing the pixel values, comprising:

change pixel detection step for detecting the pixels changing the pixelvalues and outputting the result as the detected change pixels;

1st prediction step for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels in the particular frames and outputting the result as 1stpredicted pixels;

1st difference value calculation step for calculating the differencesbetween the detected change pixels and the 1st predicted change pixelsto output the calculated difference as 1st difference values D;

2nd prediction step for predicting change pixels of the input signals,along with the motion compensation, based on the pixels changing thepixel values of already encoded and decoded pixels in reference framesto output the predicted result as 2nd predicted pixels;

2nd difference value calculation step for calculating the differencesbetween the detected change pixels and the 2nd predicted change pixelsto output the calculated difference as 2nd difference values D″;

mode selection step for calculating the code lengths of the firstdifference value D and the second difference value D″ when respectivelyencoded, and selecting the value having the shorter code length bycomparing the calculated results, and outputting either of “the first”or “the second” depending on the selection as an encoding mode; and

encoding step for encoding the selected first difference value D or thesecond difference values D″, and the encoded mode output by the modeselection mode,

whereby an encoded signal which should have the minimum code length canbe selected and output by comparing the prediction based on theparticular frame and the prediction based on the motion-compensatedreference frame to perform encoding, resulting in reduced bit numberrequired for encoding by utilizing the inter-frame pixel correlation.

A 73rd aspect of this invention provides an image encoding method whichreceives two-dimensional two-valued image signals as input signals andencodes pixels of the input signals changing the pixel values,comprising:

change pixel detection step for detecting the pixels changing the pixelvalues and outputting the result as the detected change pixels;

1st prediction step for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels by horizontally scanning the image signals and outputtingthe result as 1st predicted pixels;

1st difference value calculation step for calculating the differencesbetween the detected change pixel and the 1st predicted change pixel andoutputting the calculated difference as 1st difference values D;

2nd prediction step for predicting change pixels of the input signalsbased on the pixels changing the pixel values of already encoded anddecoded pixels by vertically scanning the image signals and outputtingthe predicted pixel as 2nd predicted pixels;

2nd difference value calculation step for calculating the differencesbetween the detected change pixel and 2nd predicted change pixel andoutputting the calculated difference as 2nd difference value D″;

mode selection step for calculating the code lengths of the firstdifference value D and the second difference value D″ when respectivelyencoded, selecting one having the shorter code length by comparing thecalculated results, and outputting either of “the first” or “the second”as an encoding mode according to the selection; and

encoding step for encoding the selected first difference value D or thesecond difference value D″, and the encoded mode output by the modeselection mode,

whereby a signal which should have the minimum code length can beselected and output by comparing the prediction by horizontal scanningand the prediction by vertical scanning to perform encoding, resultingin reduced bit number required for encoding utilizing local changes inthe horizontal and vertical correlations of the image.

A 74th aspect of this invention provides an image encoding method whichreceives image signals with blocked shapes consisting of shape signalsindicating the shapes of objects and whether the pixel value of pixelsare significant or not and the pixel value signals as input signals andencodes the input signals referring to reference images, comprising:

1st motion vector detection step for detecting motion vectors of thepixel value signal by comparing the pixel value signal of the inputsignal and the pixel value signal of the reference image;

1st motion compensation step for motion-compensating the pixel valuesignal of the reference image using the motion vector of the pixel valuesignal, and outputting a compensated pixel value signal;

1st difference value calculation step for calculating the differencebetween the pixel value signal of the input signal and the compensatedpixel value signal, and outputting 1st difference values;

1st encoding step for encoding the 1st difference value;

2nd motion vector detection step for detecting motion vectors the shapesignal by comparing the shape signal of the input signal and shapesignal of the reference image;

2nd motion compensation step for motion-compensating the shape signal ofthe reference image using the motion vector of the shape signal, andoutputting a compensated shape signal;

2nd difference value calculation step for calculating the differencebetween the shape signal of the input signal and the compensated shapesignal, and outputting 2nd difference value;

2nd encoding step for encoding the 2nd difference value; and

3rd encoding step for encoding the motion vector of the pixel valuesignal and the motion vector of the shape signal,

whereby the encoding efficiency is improved and the motion compensationerrors are further reduced using more appropriate signals which areobtained from reference images being subjected to encoding and decodingand the motion compensation value being added thereto.

A 75th aspect of this invention provides an image encoding method whichreceives the image signal which consists of either of the shapeinformation indicating whether or not pixel values of respective pixelsof an object are significant, or the transparency information indicatingthe synthesis ratio for respective pixels of the object, and the pixelvalue information, as an input image signal, comprising:

blocking step for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding step for selecting an encoding mode from the given set ofencoding modes for each piece of shape information formed into blocks bythe blocking step, the transparency information and the pixel valueinformation, and encoding each piece of information with each selectedencoding mode;

2nd encoding step for encoding all mode-identifying information, each ofwhich indicates the selected mode for each piece of shape information,transparency information, and pixel value information; and

the outputs of the 1st and 2nd encoding step being output as encodedoutputs,

whereby all the high-correlated shape, transparency and pixel valueinformation are collectively encoded, and the variable-length encodingin which codes having the same modes have short code length can be used,resulting in reduced bit number of the encoded mode signal.

A 76th aspect of this invention provides an image encoding method whichreceives the image signal which consists of either of the shapeinformation indicating whether pixel values of respective pixels of anobject are significant or not, or the transparency informationindicating the synthesis ratio for respective pixel of the object, andthe pixel value information, as an input image signal, comprising:

blocking step for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding step for selecting an encoding mode from the given set ofencoding modes for each piece of shape information formed into blocks bythe blocking step and the transparency information, and encoding eachpiece of information with each selected encoding mode;

2nd encoding step for encoding the pixel value information formed intoblocks by the blocking step with either of the encoding modes selectedby the 1st encoding step;

3rd encoding step for encoding all mode-identifying information, each ofwhich indicates the selected mode for each piece of shape information,the transparency information and the pixel value information; and

the outputs of the 1st encoding step, 2nd encoding step and 3rd encodingstep being output as the encoded outputs,

whereby the selected modes are is likely to become identical each other,and the variable-length encoding makes it possible to reduce the bitnumber of the encoded mode signal to a further extent.

A 77th aspect of this invention provides an image encoding method whichreceives the image signal which consists of either of the shapeinformation indicating whether pixel values of respective pixels of anobject are significant or not, or the transparency informationindicating the synthesis ratio for respective pixels of the object, andthe pixel value information, as an input image signal, comprising:

blocking step for integrating pixels which spacially and temporallycoincide with the input image signal into a group and outputting thegroup as blocked information;

1st encoding step for selecting an encoding mode from the given set ofencoding modes for the pixel value information formed into blocks by theblocking step, and encoding the pixel value information with theselected encoding mode;

2nd encoding step for encoding the shape information and thetransparency information formed into blocks by the blocking step, andthe transparency information with the encoding mode selected in the 1stencoding step;

3rd encoding step for encoding all mode-identifying information, each ofwhich indicates the selected mode for each piece of shape information,the transparency information and the pixel value information; and

the outputs of the 1st, 2nd and 3rd encoding steps being output as theencoded output,

whereby the selected modes become is likely to become identical eachother by outputting , and the variable-length encoding makes it possibleto reduce the bit number of the encoded mode signal to a further extent.

A 78th aspect of this invention provides an image encoding method whichreceives two-dimensional image signals consisting of a plurality ofpixels as input signals and encodes the same, comprising:

1st change pixel detection step for detecting the pixels changing thepixel values by scanning the two-dimensional image signal in the givendirection and outputting the detected 1st change pixels;

2nd change pixel detection step for detecting the pixels changing thepixel values by scanning the already encoded and decoded pixels in thegiven direction and outputting the detected 2nd change pixels;

3rd change pixel detection step for detecting the pixels changing thepixel values by scanning the already encoded and decoded pixels in thegiven direction and outputting the detected 3rd change pixels;

change pixel prediction step for predicting the 1st change pixels basedon the 2nd change pixels and the 3rd change pixels and outputting thepredicted change pixels;

prediction error calculation step for calculating the differencesbetween the 1st change pixels and the predicted change pixels, andoutputting the calculated difference values of change pixels; and

prediction error encoding step for encoding the difference values ofchange pixels to be encoded signals,

whereby the error in prediction is encoded, resulting in enhancement inthe encoding efficiency.

A 79th aspect of this invention provides an image encoding method whichreceives two-dimensional image signals consisting of a plurality ofpixels as input signals and encodes the same, comprising:

change pixel detection step for detecting the pixels changing the pixelvalues by scanning the two-dimensional image signal in the givendirection and outputting the detected change pixels;

change pixel prediction step for predicting change pixels based onencoded and decoded pixels and outputting the predicted change pixels;

prediction error calculation step for calculating the differencesbetween the detected change pixels and predicted change pixels, andoutputting the calculated difference values of change pixels;

prediction error encoding step for encoding the difference value ofchange pixels and outputting the difference value encoded signal, whenthe difference value of change pixels is less than the given value;

pixel number encoding step for calculating the number of the pixelswhich are positioned between the immediately previous encoded pixel andthe above-described detected change pixel and are not positioned at thepixel position where the prediction error encoding step can encode, andencoding the calculated pixel number to output an pixel number encodedsignal, when the difference value of change pixel is less than the givenvalue; and

the prediction error encoding step and the pixel number encoding stepperforming encodings in which the difference value encoded signal andthe pixel number encoded signal are uniquely identifiable thereby tooutput the prediction error encoded signal when the prediction error iswithin the given range, and to output the pixel number encoded signalwhen the prediction error is beyond the given range as the outputencoded signal;

whereby when the prediction error is large, the appropriate encoding iscarried out, averting the reduction in the encoding efficiency even whenthe prediction error is so large that the variations of the number ofthe change pixels unables the prediction of the change pixel.

An 80th aspect of this invention provides an image encoding method whichreceives two-dimensional shape signals indicating the area where pixelsrepresenting an object exist and encodes the shape signals, comprising:

significant area extracting step for extracting the significant areawhich contains the pixels representing an object from the input shapesignal and outputting a significant area range representing the rangecovering the extracted significant area;

blocking step for dividing the shape signal into blocks having aplurality of pixels;

shape encoding step for judging whether each of the respective blocksoutput by the blocking step contains the significant area, and encodingthe significant area of the block at least when it is judged that theblock contains the significant area; and

the significant area range and the shape encoded signal being made asencoded signals;

whereby the range of the significant area is detected and the block sizeof the shape signal is changed so that the shape signal only in theinside of the significant area is encoded, resulting in no encodingbeing performed beyond the range of the significant area, and improvedencoding efficiency for the shape signal.

An 81st aspect of this invention provides an image encoding method whichreceives two-dimensional image signals consisting of a plurality ofpixels as input signals and encodes the same, comprising:

image signal separation step for separating the image signal into atleast 2 image signals, and outputting the separated image signals as 2or more partial image signals;

1st image signal encoding step for selecting at least one of the partialimage signals as a target partial image signal and encoding the selectedtarget partial image signal to output a 1st encoded signal;

prediction probability calculating step for predicting the non-targetpartial image signal which is the partial image signal except the targetpartial image signal on the basis of the image signal decoded from the1st encoded signal, and calculating the probability that the predictioncomes true, and outputting the calculated prediction probability; and

2nd image signal encoding step for determining the degree of priority ofdecoding based on the prediction probability calculated by theprediction probability calculation step, and encoding the non-targetpartial image signal using the encoding method according to thedetermined degree of priority,

whereby the pixels of smaller prediction probability are encoded withpriority, resulting in that the hierarchical encoding having lesspicture-quality degradation can be performed without any additionalinformation.

An 82nd aspect of this invention provides an image decoding method whichreceives encoded signals and decodes the same, comprising:

decoding step for decoding the encoded signal to obtain the encoded modeand the difference value, and outputting the obtained encoding mode as amode signal and the obtained difference value as a decoded differencevalue;

1st prediction step for predicting the change pixel of the input signalbased on the pixel changing the value among the already encoded anddecoded pixels in the particular frame, and outputting the predictedpixels as 1st predicted pixels;

2nd prediction step for predicting the change pixel of the input signal,with the motion compensation, based on the pixel changing the valueamong the already encoded and decoded pixels in the reference frame, andoutputting the predicted pixels as 1st predicted pixels;

addition step for adding the decoded difference value to the 1stpredicted pixel when the mode signal indicates the frame prediction, andadding the decoded difference value to the 2nd predicted pixel when themode signal indicates the reference frame prediction; and

the output of the addition step being made the change pixel;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 72 can be appropriately decoded.

An 83rd aspect of this invention provides an image decoding method whichreceives encoded signals and decodes the same, comprising:

decoding step for decoding the encoded signal to obtain the encoded modeand the difference value, and outputting the obtained encoding mode as amode signal and the obtained difference value as a decoded differencevalue;

1st prediction step for predicting the change pixel of the input signal,based on the pixel changing the pixel value among the already encodedand decoded pixels, by horizontally scanning the image signal, andoutputting the predicted pixels as 1st predicted pixels;

2nd prediction step for predicting the change pixel of the input signal,with the motion compensation, based on the pixel changing the pixelvalue among the already encoded and decoded pixels, by horizontallyscanning the image signal, and outputting the predicted pixels as 2ndpredicted pixels;

addition step for adding the decoded difference value to the 1stpredicted pixel when the mode signal indicates the prediction by thehorizontal scanning, and adding the decoded difference value to the 2ndpredicted pixel when the mode signal indicates the prediction by thevertical scanning; and the output of the addition step being made thechange pixel;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 73 can be appropriately decoded.

An 84th aspect of this invention provides an image decoding method whichreceives encoded signals and decodes the same, comprising:

1st decoding step for decoding the encoded signal to obtain thedifference value of the pixel value signal, and outputting the decodedpixel value difference value;

2nd decoding step for decoding the encoded signal to obtain thedifference value of the shape signal, and outputting the decoded shapedifference value;

3rd decoding step for decoding the encoded signal to obtain the motionvectors of the pixel value signal and the motion vectors of the shapesignal, and outputting the decoded pixel value motion vectors and thedecoded shape motion vectors;

1st motion compensation step for compensating the pixel value signal ofa reference image described below using the decoded pixel value motionvectors, and outputting the result of the motion compensation as acompensated pixel value signal;

1st addition step for adding the decoded pixel value difference valueand the compensated pixel value signal, and outputting the result ofaddition as a decoded pixel value signal as well as a pixel value signalof a reference image;

2nd motion compensation step for compensating the shape signal of areference image described below using the decoded shape motion vectors,and outputting the result of the motion compensation as a compensatedshape signal; and

2nd addition step for adding the decoded shape difference value to thecompensated shape signal, and outputting the result of the addition as adecoded shape signal as well as a shape signal of a reference image;

whereby the encoded signal obtained by the image encoding apparatus ofclaim 74 can be appropriately decoded.

An 85th aspect of this invention provides an image decoding method whichreceives encoded signals and decodes the same, comprising:

1st decoding step for decoding the input encoded signal to obtain themode identifying information indicating each encoding mode of the shapeinformation, transparency information and pixel value information;

2nd decoding step for decoding, according to the obtained modeidentifying information, the blocked shape information, transparencyinformation and pixel value information; and

reverse blocking step for integrating the blocked shape information,transparency information and pixel value information output by the 2nddecoding step and outputting the decoded image signal,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 76 can be appropriately decoded.

An 86th aspect of this invention provides an image decoding method whichreceives encoded signals as input signals and decodes thetwo-dimensional image signals consisting of a plurality of pixels,comprising:

2nd change pixel detection step for detecting the pixels changing thepixel values by scanning the already decoded pixels in the givendirection and outputting the detected 2nd change pixels;

3rd change pixel detection step for detecting the pixels changing thepixel values by scanning the already decoded pixels in the givendirection and outputting the detected 3rd change pixels;

change pixel prediction step for predicting 1st change pixels describedbelow based on the 2nd change pixels and the 3rd change pixels andoutputting the predicted change pixels;

prediction error decoding step for decoding the input encoded signals toobtain the prediction error and outputting the obtained predictionerror;

1st change pixel decoding step for adding the predicted change pixel andprediction error, and outputting the 1st change pixel; and

pixel value decoding step for decoding the pixel values, assuming thatthere should be no pixels changing pixel values between the immediatelyprevious decoded change pixel and 1st change pixel,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 79 can be appropriately decoded.

An 87th aspect of this invention provides an image decoding method whichreceives the encoded two-dimensional image signals consisting of aplurality of pixels as input signals, and encodes and outputs the imagesignals, comprising:

change pixel detection step for detecting the pixels changing the pixelvalues by scanning the already decoded two-dimensional image signal inthe given direction and outputting the detected change pixels;

change pixel prediction step for predicting change pixels on theparticular scanning line based on the detected change pixels andoutputting the result as predicted change pixels;

mode decoding step for decoding the input encoded signals and judgingwhether the input signal is the difference value encoded signal or pixelnumber encoded signal, and outputting the identifying signal;

prediction error decoding step for decoding the difference value encodedsignal and outputting the decoded prediction error when the identifyingsignal indicates the encoded difference value signal;

1st change pixel decoding step for adding the predicted change pixel andthe decoded prediction error and outputting the result of the additionas a 1st decoded change pixel, when the identifying signal indicates theencoded difference value signal;

2nd change pixel decoding step for decoding the number of pixels whichare not positioned at the pixel positions of the decoded predictionerror between the immediately previous decoded change pixel and thedetected 1st change pixel from the encoded pixel number signal, andobtaining the positions of change pixels based on the number of thedecoded pixels, and outputting the obtained result as 2nd decoded changepixels, when the identifying signal indicates the encoded pixel numbervalue signal;

change pixel selection step for selecting the 1st decoded change pixelor the 2nd decoded change pixel according to the identifying signal tooutput the same; and

change pixel decoding step for decoding the pixel values, assuming thatthere should be no pixels changing pixel values between the immediatelyprevious decoded change pixel and the 1st change pixel,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 80 can be appropriately decoded.

An 88th aspect of this invention provides an image decoding method whichreceives encoded signals and decodes the same to output two-dimensionalshape signals representing the area where there exist pixelsrepresenting an object, comprising:

significant area decoding step for decoding the encoded signals,obtaining rectangular areas where there exist the pixels representing anobject, and outputting the obtained areas as significant areas;

shape decoding step for judging whether each of blocks having aplurality of pixels contains the significant area or not, and when it isjudged that the block contains the significant area, encoding at leastthe significant area of the block, and outputting the decoded result asdecoded block shape signals; and

reverse blocking step for integrating the decoded block shape signals toconstitute a two-dimensional shape signal, and outputting theconstituted two-dimensional shape signal,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 81 can be appropriately decoded.

An 89th aspect of this invention provides an image decoding method whichreceives encoded signals and decodes two-dimensional image signalsconsisting of a plurality of pixels to output the same, comprising:

1st image signal decoding step for decoding the encoded signals andoutputting 1st decoded signals;

image prediction step for predicting and outputting image signals whichhave not decoded by the 1st image signal decoding step, based on theimage signals decoded by the 1st image signal decoding step;

prediction probability calculation step for calculating and outputtingthe probability that the predicted image signal comes true;

2nd image signal decoding step for decoding the encoded signals whichare input with the degree of priority according to the predictionprobability calculated by the prediction probability calculation step;and

decoded signal integration step for integrating the outputs of the 1stimage signal decoding step and the 2nd image signal decoding step, andreplacing the image signal which is neither decoded by the 1st imagesignal decoding step nor by the 2nd image signal decoding step, with theimage signal predicted by the image prediction step, and outputting thedecoded image signal,

whereby the encoded signal obtained by the image encoding apparatus ofclaim 82 can be appropriately decoded.

90th to 99th aspects of this invention provides image encoding programmedia wherein, programs implementing image encoding methods of the 72ndto 81st aspects are recorded,

whereby image encodings of high encoding efficient are performed oncomputers which are equipped with these media.

100th to 107th aspects of this invention provides image decoding programmedia wherein, programs implementing image decoding methods of the 82ndto 189th aspects are recorded,

whereby decoding of the encoded signals obtained by the image encodingmethods of the 72nd to 81st aspects can be appropriately performed oncomputers which are equipped with these media.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the structure of an image encodingapparatus according to a 1st embodiment of this invention.

FIGS. 2(a)-2(f) are drawings which explain the operation principles ofan image encoding apparatus according to a 1st embodiment of thisinvention.

FIG. 3 is a block diagram showing the structure of an image encodingapparatus according to a 2nd embodiment of this invention.

FIGS. 4(a)-4(e) are drawings which explain the operation principles ofan image encoding apparatus according to a 2nd embodiment of thisinvention.

FIG. 5 is a block diagram showing the structure of an image decodingapparatus according to a 3rd embodiment of this invention.

FIG. 6 is a block diagram showing the structure of another imagedecoding apparatus according to a 3rd embodiment of this invention.

FIG. 7 is a block diagram showing the structure of an image encodingapparatus according to a 4th embodiment of this invention.

FIG. 8 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 4th embodiment of this invention.

FIG. 9 is a block diagram showing the structure of an image decodingapparatus according to a 5th embodiment of this invention.

FIG. 10 is a block diagram showing the structure of an image encodingapparatus according to a 6th embodiment of this invention.

FIG. 11 is a block diagram showing the structure of an image decodingapparatus according to a 7th embodiment of this invention.

FIG. 12 is a block diagram showing the structure of an image encodingapparatus according to an 8th embodiment of this invention.

FIG. 13 is a block diagram showing the structure of an image encodingapparatus according to a 9th embodiment of this invention.

FIG. 14 is a block diagram showing the structure of an image encodingapparatus according to a 10th embodiment of this invention.

FIG. 15 is a block diagram showing the structure of an image decodingapparatus according to a 11th embodiment of this invention.

FIG. 16 is a block diagram showing the structure of an image decodingapparatus according to a 12th embodiment of this invention.

FIG. 17 is a block diagram showing the structure of an image encodingapparatus according to a 13th embodiment of this invention.

FIG. 18 is a block diagram showing the structure of an image encodingapparatus according to a 14th embodiment of this invention.

FIG. 19 is a block diagram showing the structure of an image encodingapparatus according to a 15th embodiment of this invention.

FIG. 20 is a block diagram showing the structure of an image encodingapparatus according to a 16th embodiment of this invention.

FIG. 21 is a block diagram showing the structure of an image encodingapparatus according to a 17th embodiment of this invention.

FIG. 22 is a block diagram showing the structure of an image encodingapparatus according to an 18th embodiment of this invention.

FIG. 23 is a block diagram showing the structure of an image encodingapparatus according to a 19th embodiment of this invention.

FIG. 24 is a block diagram showing the structure of an image encodingapparatus according to a 20th embodiment of this invention.

FIG. 25 is a block diagram showing the structure of an image decodingapparatus according to a 21st embodiment of this invention.

FIG. 26 is a block diagram showing the structure of an image encodingapparatus according to a 22nd embodiment of this invention.

FIG. 27 is a block diagram showing the structure of an image encodingapparatus according to a 23rd embodiment of this invention.

FIG. 28 is a block diagram showing how the number of motion vectors isselected in an image encoding apparatus according to a 23rd embodimentof this invention.

FIG. 29 is a block diagram showing the structure of an image encodingapparatus according to a 24th embodiment of this invention.

FIG. 30 is a block diagram showing the structure of an image encodingapparatus according to a 25th embodiment of this invention.

FIG. 31 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 26th embodiment of this invention.

FIG. 32 is a block diagram showing the structure of an image encodingapparatus according to a 26th embodiment of this invention.

FIG. 33 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 27th embodiment of this invention.

FIG. 34 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 28th embodiment of this invention.

FIG. 35 is a block diagram showing the structure of an image encodingapparatus according to a 29th embodiment of this invention.

FIG. 36 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 29th embodiment of this invention.

FIG. 37 is a block diagram showing the structure of an image decodingapparatus according to a 30th embodiment of this invention.

FIG. 38 is a block diagram showing the structure of an image decodingapparatus according to a 31st embodiment of this invention.

FIG. 39 is a block diagram showing the structure of an image decodingapparatus according to a 32nd embodiment of this invention.

FIG. 40 is a block diagram showing the structure of an image encodingapparatus according to a 33rd embodiment of this invention.

FIG. 41 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 33rd embodiment of this invention.

FIG. 42 is a block diagram showing the structure of an image decodingapparatus according to a 34th embodiment of this invention.

FIG. 43 is a drawing for explaining the prediction area in an imageencoding apparatus and an image decoding apparatus according to a 35thembodiment of this invention.

FIG. 44 is a block diagram showing the structure of an image encodingapparatus according to a 36th embodiment of this invention.

FIG. 45 is a drawing for explaining the operating principle of an imageencoding apparatus according to a 36th embodiment of this invention.

FIG. 46 is a block diagram showing the structure of an image decodingapparatus according to a 37th embodiment of this invention.

FIG. 47 is a block diagram showing the structure of an image decodingapparatus according to a 38th embodiment of this invention.

FIGS. 48(a)-48(b) are drawings which explain the operation principles ofan image encoding apparatus according to a 38th embodiment of thisinvention.

FIG. 49 is a block diagram showing the structure of an image decodingapparatus according to a 39th embodiment of this invention.

FIG. 50 is a drawing showing a floppy disk as an example of recordingmedia for a image encoding program and a image decoding programaccording to a 40th embodiment of this invention.

FIG. 51 is a flowchart showing the processing procedure of an imageencoding program of a 40th embodiment of this invention.

FIG. 52 is a flowchart showing the processing procedure of an imagedecoding program of a 40th embodiment of this invention.

FIGS. 53(a)-53(d) are drawings which explain the shape information of animage in an image encoding.

BEST EMBODIMENTS OF INVENTION

Embodiment 1

An image encoding apparatus according to a 1st embodiment of thisinvention performs efficient encoding in prediction encoding byselecting difference values having short code lengths within the givenrange.

FIG. 1 is a block diagram showing the structure of the image encodingapparatus according to the 1st embodiment of this invention. In thefigure, 1 indicates an input signal, which is input to the imageencoding apparatus as a two-valued image signal. 2 indicates a changepixel detector which detects pixels changing pixel values in the inputsignal 1 and outputs the detected change pixels. 3 indicates a memorywhich temporarily stores already encoded and decoded image signals whichare to be used as reference images. 4 indicates a change pixel predictorwhich predicts change pixels output by the change pixel detector 2 basedon pixels changing pixel values of the reference image, and outputspredicted change pixels. As a prediction method used by the change pixelpredictor 4, for example, there can be used the most typical method thatpredicts that a change pixel should be or a horizontal position the sameas that on the upper-positioned scanning line, based on the strongvertical correlation of the two-dimensional image signal, and so on. 5indicates a difference value calculator which calculates the differencevalue D between the change pixel detected by the change pixel detector 2and the predictor 4. 6 indicates a value e which is a given value as thetolerance value of a rounding error and is input to a difference valuerounder. 7 indicates the difference value rounder which modifies thedifference value D within the range defined by the tolerance value e,and outputs a modified difference value D′. 8 indicates an encoder whichencodes the difference value. 9 indicates the encoded signal which isoutput by the encoder 8. 11 indicates difference value adder which addsthe modified difference value D′ and the predicted change pixel outputby the change pixel predictor 4. 10 indicates a change pixel decoderwhich decodes the two-valued pixel using the result of the additionoutput by the difference value adder 11.

The operation of the image encoding apparatus according to the 1stembodiment as constructed above is described. The input signal 1, i.e. atwo-valued signal, is input to the apparatus. The change pixel detector2 receives the input signal 1 and detects pixels changing the two-valuedpixel values. On the other hand, the change pixel predictor 4 reads outthe reference image stored in the memory 3 and predicts change pixels inthe input signal. The change pixel detector 2 outputs the detectedresult as detected change pixels to the difference value calculator 5.The change pixel predictor 4 outputs the predicted result as predictedchange pixels to the difference value calculator 5. Thereafter, thedifference value calculator 5 subtracts the predicted change pixel fromthe detected change pixel to obtain the difference value D correspondingto the prediction error of the change pixel. The difference valuecalculator 5 outputs the difference value D to the difference valuerounder 7.

The difference value rounder 7 compares the given tolerance value e withthe difference value D corresponding to the prediction error output bythe difference value calculator 5, and outputs a value x which satisfiesD−e≦x≦D+e and the bit number of which should be minimum when x isencoded, as the modified difference value D′, when the difference valueD does not exceed the tolerance value e. As opposed to this, when thedifference value D is beyond the tolerance value e, the difference valuerounder 7 obtains the modified difference value D′ based on thetolerance value e to be output to the encoder 8. Thereafter, themodified difference value D′ is encoded by the encoder 8 to become theencoded signal 9.

Also, the modified difference value D′ output by the difference valuerounder 7 is output to the difference value adder 11. In the differencevalue adder 11, the modified difference value D′ is added to thepredicted change pixel output by the change pixel predictor 4 andthereby the pixel value of the change pixel is calculated and is outputto the change pixel decoder 10. The change pixel decoder 10 decodes thepixel value of each pixel from the already decoded pixel output by thechange pixel predictor 4 to the change pixel input by the differencevalue adder 11, and stores the decoded result in the memory 3.Subsequently, the stored content in the memory 3 is used as thereference image.

The above-described operation is concretely explained, referring to FIG.2. FIG. 2 shows a model of a two-valued image signal, indicating whiteand black(fine slant lines) as pixels. For the simplicity ofdescription, the processing procedure is explained, assuming that theprocessing is carried out pixel by pixel.

FIG. 2(a) shows the input signal. The scanning goes from top left in theright direction. The process proceeds toward the bottom right. Thechange pixel is a pixel which changes the pixel value (white->black orblack ->white) on a line (the scanning line). Pc in FIG. 2(b) indicatesan already encoded final pixel. Pu indicates the change pixel of theupper-positioned scanning line. Parts having rough slant lines indicatepixels not encoded yet. The change pixel detector 2 checks change pixelschanging pixel values in part not encoded yet shown FIG. 2 (b) of theinput signal shown in FIG. 2(a), and detects a change pixel P1 andoutputs the result as a detected change pixel.

On the other hand, the change pixel predictor 4 predicts the changepixel by the above-described method, obtains pixel P0 by assuming thatthe change pixel should exist t on the same horizontal position as thatof the change pixel Pu of the upper-positioned scanning line, andoutputs the result as a predicted change pixel to the difference valuecalculator 5. The difference value calculator 5 outputs D=1 as thedifference value between the detected change pixel P1 and the predictedchange pixel P0 to the difference value rounder 7.

In this case, for the image encoding apparatus according to the 1stembodiment, it is assumed that such an encoding would be performed sothat the difference value different from P0 by the smaller value isassigned the code having the shorter code length. And the tolerancevalue of the round error would be given 1. Because the differencebetween P1 and P0 calculated by the difference value calculator is equalto or smaller than e, the difference value rounder 7 outputs D″=0 as thevalue satisfying the above-described condition. As a result, the changepixel is rounded and is subjected to the encoding process, whereby theencoded and decoded pixel value becomes what is shown in FIG. 2(c).

As opposed to this, when the input signal is what is shown in FIG. 2(d),as shown in FIG. 2(e), the difference value indicated by the differencebetween the predicted change pixel P0 and the detected change pixel P1becomes 2, so that in this case the difference value D exceeds thetolerance value e. Therefore, the difference value rounder 7 modifiesthe prediction error(the difference value), based on the tolerance valuee, not exceeding the tolerable range, and outputs the difference value-1corresponding to the change pixel P2. As a result, the encoded anddecoded pixel value becomes what is shown in FIG. 2(f).

As described above, the image encoding apparatus according to the 1stembodiment has the difference value rounder 7, and selects the modifieddifference value which is to have the maximum code length of theerror(difference value) in the range of the prediction error equal to orsmaller than the tolerance value, using the difference value between thedetected change pixel and the predicted change pixel and the giventolerance value 6, and outputs the modified difference value. As aresult, though there exists a little degradation of picture quality, therequired bit number is reduced to a large extent. In addition, theencoded signal 9 obtained in the image encoding apparatus according tothe 1st embodiment can be decoded by an ordinary image decodingapparatus.

Embodiment 2

An image encoding apparatus according to a 2nd embodiment of thisinvention performs processes, adaptively switching an encoding based onprediction from a particular frame and an encoding based on predictionfrom a reference frame with motion compensation.

FIG. 3 is a block diagram showing the structure of the image encodingapparatus according to the 2nd embodiment. In the figure, 20 indicates amotion compensation unit which generates reference pixel values for thealready encoded and decoded image signal of a reference frame byperforming motion compensation. 21 indicates a mode selector whichcompares the difference value when prediction is carried out based onthe image signal of the particular frame, with the difference value whenprediction is carried out based on the image signal of the referenceframe, and then selects one of the two values which has the smaller bitnumber required for encoding. 22 indicates a switching unit whichselects the difference value corresponding to the encoding mode selectedby the mode selector 21. 1 to 9 indicate the same as those of FIG. 1 andthe description is also the same and omitted here.

A description is given of the image encoding apparatus according to the2nd embodiment having the above-described structure. When an inputsignal 1 which is a two-valued image signal is input to the apparatus,the input signal 1 is input to the change pixel detector 2 and theninput to the memory 3 and stored in the memory 3. The stored inputsignal is used as an already encoded and decoded reference image. Thechange pixel detector 2 receives the input signal 1 and detects thepixel which changes the two-valued pixel value. The change pixeldetector 2 outputs the detected result as a detected change pixel to thedifference value calculators 5 a and 5 b. On the other hand, the changepixel predictor 4 a reads out the already encoded and decoded referenceimage of the particular frame stored in the memory 3, and predicts achange pixel based on the particular input signal to be output as apredicted change pixel to the difference value calculator 5 a. Followingthis, the difference value calculator 5 a subtracts the predicted changepixel from the detected change pixel to obtain a difference value D. Thedifference value D which is the output of the difference valuecalculator 5 a corresponds to the prediction error of the predictedchange pixel based on the already encoded and decoded pixel of theparticular frame. The difference value calculator 5 a outputs thedifference value D to the mode selector 21 and the switching unit 22.

The motion compensation unit 20 subjects the already encoded and decodedimage of the reference frame stored in the memory 3 to the motioncompensation. The change pixel predictor 4 b predicts the change pixelof the particular input signal based on the motion-compensated pixel tobe output as a predicted change pixel to the difference value calculator5 b. The difference value calculator 5 b subtracts the predicted changepixel from the detected change pixel and obtains a difference value D″.The difference value D″ which is the output of the difference valuecalculator 5 b corresponds to the prediction error of the predictedchange pixel based on the already encoded and decoded pixel of theparticular frame. The difference value calculator 5 b outputs thedifference value D to the mode selector 21 and the switching unit 22.

The mode selector 21 compares the code lengths (the required bit numberfor encoding) of the difference value D and the difference value D″input from the difference value calculators 5 a and 5 b whenrespectively encoded, and selects the prediction method which needs asmaller bit number for encoding, and outputs the identifying signal asan encoding mode. The mode selector 21 outputs the encoding mode“particular frame” if the code length is short when the difference valueD is encoded, or outputs the encoding mode “reference frame” if the codelength is short when the difference value D″ is encoded, to theswitching unit 22 and the encoder 8 a.

The switching unit 22, responding to the output of the mode selector 21,outputs the difference value D output by the difference value calculator5 a if the encoding mode is “particular frame”, or outputs thedifference value D″ output by the difference value calculator 5 b if theencoding mode is “reference frame”. The encoder 8 a encodes the encodingmode selected by the mode selector 21 and outputs an encoded signal 9 a.The encoder 8 b encodes the output difference value and outputs anencoded signal 9 b.

The image encoding apparatus according to the 2nd embodiment performsencoding without any rounding error and stores the input image signal 1as the encoded and decoded pixel values up to the change pixel asdescribed above, in the memory 3.

The above-described operation is concretely explained, referring to FIG.4. FIG. 4 shows a model of a two-valued image signal, indicating whiteand black pixels as pixels, similarly to FIG. 2 used for explaining the1st embodiment. For the simplicity of description, the processingprocedure is explained, assuming that the processing is carried outpixel by pixel.

In the figure, FIG. 4(a) shows the input signal, FIG. 4(b) shows theimage signal of the reference frame and FIG. 4(c) is a drawing forexplaining the prediction based on the particular frame. P1 indicatesthe change pixel detected by the change pixel detector 2 similarly tothe 1st embodiment. Pc indicates an already encoded final pixel. Puindicates the change pixel of the upper-positioned scanning line. Partshaving rough slant lines indicate pixels which are not encoded yet. Thechange pixel predictor 4 a, using the similar way of prediction ofchange pixels in the 1st embodiment, makes a prediction based on thechange pixel Pu on the upper-positioned scanning line by utilizing thecorrelation and makes P0 which is positioned on the same horizontalposition as that of Pu the predicted change pixel based on theparticular frame.

FIG. 4(b) shows the reference frame after the performance of the motioncompensation unit 20. The change pixel predictor 4 b obtains thepredicted change pixel Pr. Accordingly, the difference value D in thedifference value calculator 5 a becomes 1, the difference P1 and P0. Thedifference value D″ in the difference value calculator 5 b becomes 0,the difference P1 and Pr. In the image encoding apparatus according tothe 2nd embodiment as well as that of the 1st embodiment, if theencoding is such that a code having a shorter code length is assigned toa difference value as the difference from P0 is smaller, the code forthe difference P1 and P0 has a shorter code length than that for thedifference Pr and P1. Accordingly, the mode selector 21 selects“reference frame” which outputs the difference D″, so that the encodingmode “reference frame” and the difference value D″ are encoded andbecome the encoded signal output by the image encoding apparatusaccording to the 2nd embodiment. FIG. 4(e) shows the result which isobtained by decoding the encoded signal.

As described above, the image encoding apparatus according to the 2ndembodiment, by the memory 3, the change pixel predictors 4 a and 4 b,the difference value calculators 5 a and 5 b and the motion compensationunit 20, makes the prediction based on the particular frame, and theprediction based on the reference frame, and obtains the differencevalue between each predicted value and the detected result; and by themode selector 21, switching unit 22 and encoders 8 a and 8 b, comparesthe difference values from the prediction based on the particular frameand from the prediction based on the reference frame, and selects thedifference value which has the minimum code length, and encodes thedifference value, where, by utilizing the correlation between frames,the bit number required for encoding is reduced to a large extent.

Note that the image encoding apparatus according to the 2nd embodimentreceives the input signal 1 block by block and the encoding mode isselected for respective blocks, that is, the encoding based on theprediction with the particular frame and the encoding based on theprediction with the reference frame using the motion compensation are,block by block, switched, whereby obtaining the above-described result.

Also, in the image encoding apparatus according to the 2nd embodiment,the change pixel detector 2, and the change pixel predictors 4 a and 4 boutput the distance (pixel number) to the change pixel. However, it isalso possible to output a two-valued signal, for example, ‘0’ or ‘1’representing “the next pixel is a change pixel” or “the next pixel isnot a change pixel”, respectively, and the difference calculators 5 aand 5 b calculate the two-valued signal. However, in this case, it isnot that the distance is encoded as described above, but that theoutputs of the difference calculators 5 a and 5 b are encoded for therespective pixels of the input signal 1. As described above, the outputsof the change pixel detector 2 and the change pixel predictors 4 a and 4b have two values, which results in a simplification of the encodingprocess.

Embodiment 3

An image decoding apparatus according to a 3rd embodiment of thisinvention which performs appropriate decoding for encoded signalsencoded by the image encoding apparatus according to the 2nd embodiment.

FIG. 5 is a block diagram showing the structure of the image decodingapparatus according to the 3rd embodiment. In the figure, 30 a and 30 bcorrespond to the encoded signals 9 a and 9 b of FIG. 3, respectively.30 a indicates a signal into which the encoding mode is encoded, and 30b indicates a signal into which the difference value is encoded. 31 aindicates a decoder which decodes the signal into which the encodingmode is encoded and obtains a predicted mode signal. 31 b indicates adecoder which decodes the signal into which the difference value isencoded and obtains a decoded difference value signal. 32 indicates aswitching unit which switches the predicted values of change pixels inresponse to the predicted mode signal obtained by the decoder 31 a. 34indicates a decoded image signal. The apparatus has the same memory 3,the change pixel decoder 10, and the difference value adder 11 as thosein FIG. 1 and the same motion compensation unit 20 as that in FIG. 3.Their descriptions is the same as those in the 1st and 2nd embodiments,and is therefore omitted here.

A description is given of the image decoding apparatus according to the3rd embodiment shown in FIG. 5 as constructed above. The image decodingapparatus according to the 3rd embodiment receives the input signal 30 awhich is the signal 9 a into which the selected encoded mode has beenencoded in the image encoding apparatus according to the 2nd embodiment,and the input signal 30 a is decoded in the decoder 31 a, and thepredicted mode signal indicating “particular frame” or “reference frame”is obtained. The decoder 31 a outputs the predicted mode into theswitching unit 32.

Also, the image decoding apparatus according to the 3rd embodimentreceives the input signal 30 b which is the signal 9 b into which theselected difference value has been encoded in the image encodingapparatus according to the 2nd embodiment, and the input signal 30 b isdecoded in the decoder 31 b, and the decoded difference value isobtained. The decoder 31 b outputs the decoded difference value into thedifference value addition means 11.

On the other hand, the change pixel predictor 4 a reads out an alreadydecoded reference image of the particular frame stored in the memory 3,and predicts a change pixel based on the particular image signal, andoutputs the result as a predicted change pixel based on the particularframe into the switching unit 32.

Also, the motion compensation unit 20 subjects an already decoded imageof a reference frame stored in the memory 3 to the motion compensation.The change pixel predictor 4 b predicts the change pixel of theparticular input signal based the motion-compensated pixel, and outputsthe result as a predicted change pixel based on the reference frame intothe switching unit 32.

The switching unit 32 into which the change pixel predictors 4 a and 4 boutput the predicted pixels, performs switching according to the inputpredicted mode signal. Accordingly, the switching unit 22 selects thepredicted change pixel based on the particular frame output by thechange pixel predictor 4 a if the input predicted mode signal indicates“particular frame”, or selects the predicted change pixel based on thereference frame output by the change pixel predictor 4 b if the inputpredicted mode signal indicates “reference frame”, and outputs thepredicted change pixel to the difference value addition means 11.

The difference value addition means 11 calculates a change pixel byadding the predicted change pixel obtained by the switching unit 22 withthe decoded difference value obtained from the decoder 31 b, and outputsthe result to the change pixel decoder 10. The change pixel decoder 10,based on the predicted change pixel of the change pixel prediction means4 a and the change pixel obtained by the difference value addition means11, encodes the pixel value therebetween. The result of this decoding isstored in the memory 3, and is output as a decoded image signal 34 fromthe image decoding apparatus according to the 3rd embodiment. Forexample, when the input signal is an encoded signal in such a way aswhat is described using FIG. 4 in the 2nd embodiment, the result ofdecoding shown in FIG. 4(e) is obtained.

FIG. 6 is a block diagram showing the structure of an application of theimage decoding apparatus according to the 3rd embodiment. The differencefrom the image decoding apparatus shown in FIG. 5 is that there are twodifference value addition means 11 a and 11 b, and the switching unit 33switches not the outputs of the change pixel prediction means 4 a and 4b, but the outputs of the difference value addition means 11 a and 11 b.In this case, the encoded signal output by the image encoding apparatusaccording to the 2nd embodiment can be appropriately decoded,corresponding to the encoding mode used in the encoding. Further, whenthe apparatus has a plurality of the change pixel decoders 10 and theswitching unit is positioned to receive the outputs of a plurality ofthe change pixel decoders 10, the same effect is obtained.

As described above, the image decoding apparatus according to the 3rdembodiment has the decoder 31 a which decodes the encoding mode of theencoded signal, the decoder 31 b which decodes the encoded signal of thedifference value, the change pixel prediction means 4 a which predictsthe change pixel based on the particular frame, the change pixelprediction means 4 b which predicts the change pixel based on thereference frame using the motion compensation, the difference valueaddition means 11 which performs decoding based on the predicted changepixel, and the change pixel decoder 10, whereby the switching unitperforms switching according to the predicted mode obtained by thedecoder 31 a, namely the switching unit adaptively switches the decodingbased on the particular frame and the decoding based on the referenceframe, according to the predicted mode corresponding to the encodingmode which has been used in encoding. Therefore, the encoded signalefficiently encoded in the 2nd embodiment can be appropriately decoded.

Note that in the 2nd and 3rd embodiments there can be prepared aplurality of reference frames and three or more predicted modes can beused.

Also, in the 3rd embodiment, when the encoded signal is such a signalthat is, block by block, encoded with the respective selected encodingmodes, the apparatus receives input signals block by block, and obtainsthe respective predicted modes, and performs processes block by blockaccording to each encoding mode, whereby the encoded signal can beappropriately decoded.

Embodiment 4

An image encoding apparatus according to a 4th embodiment of thisinvention which adaptively switches the encoding based on the predictionby the horizontal scanning and the encoding based on the prediction bythe vertical scanning.

FIG. 7 is a block diagram showing the structure of the image encodingapparatus according to the 4th embodiment. In the figure, 40 a and 40 bindicate horizontal scanners, and 41 a and 41 b indicate verticalscanners. The other numerals indicate the same as those of the FIG. 3,and the description of the other numerals is the same as that in the 2ndembodiment, and is therefore omitted here.

A description is given of the operation of the image encoding apparatusaccording to the 4th embodiment. When two-valued signals as inputsignals are input to the apparatus, the input signal 1 is input to thechange pixel detector 2 a by being horizontally scanned with thehorizontal scanner 40 a. The input signal 1 is also input to the changepixel detector 2 b by being vertically scanned by the vertical scanner40 a. Further, the input signal 1 is input to the memory 3 and storedtherein to be used as an already encoded and decoded reference image ofthe particular frame. The change pixel detector 2 a receives thehorizontally scanned input signal 1 and detects pixels changingtwo-valued pixel values. The change pixel detector 2 b receives thevertically scanned input signal 1 and detects pixels changing two-valuedpixel values. The change pixel detectors 2 a and 2 b output the resultof the detection as detected change pixels to the difference valuecalculators 5 a and 5 b, respectively.

On the other hand, the horizontal scanner 40 b reads out the alreadyencoded and decoded reference image of the particular frame stored inthe memory 3, horizontally scans the reference image to the change pixelpredictor 4 a to output the same. The predictor 4 a predicts changepixels to output the predicted change pixels to the difference valuecalculator 5 a. Following this, the difference value calculator 5 asubtracts the predicted change pixel from the detected change pixel andobtains a difference value Dh by the horizontal scanning. The output Dhof the difference value calculator 5 a corresponds to the predictionerror predicted by the horizontal scanning. The difference valuecalculator 5 a outputs the difference value Dh to the mode selector 21and the switching unit 22.

On the other hand, the vertical scanner 41 b reads out the alreadyencoded and decoded reference image of the particular frame stored inthe memory 3, vertically scans the reference image to the change pixelpredictor 4 b to output the same. The predictor 4 b predicts changepixels and outputs the predicted change pixels to the difference valuecalculator 5 b. Following this, the difference value calculator 5 bsubtracts the predicted change pixel from the detected change pixel andobtains a difference value Dv by the vertical scanning. The output Dv ofthe difference value calculator 5 b corresponds to the prediction errorpredicted by the vertical scanning. The difference value calculator 5 boutputs the difference value Dv to the mode selector 21 and theswitching unit 22.

The mode selector 21 compares the code lengths (the required bit numberfor encoding) of the difference values Dh and Dv input from thedifference value calculators 5 a and 5 b when respectively encoded, andselect the prediction method which requires a smaller bit number forencoding, and outputs the identifying signal as an encoding mode. Themode selector 21 outputs the encoding mode “horizontal direction” if thecode length is short when the difference value Dh is encoded, or outputsthe encoding mode “vertical” if the code length is short when thedifference value Dv is encoded, to the switching unit 22 and the encoder8 a.

The switching unit 22, responding to the output of the mode selector 21,outputs the difference value Dh output by the difference valuecalculator 5 a if the encoding mode is “horizontal direction”, oroutputs the difference value Dv output by the difference valuecalculator 5 b if the encoding mode is “vertical direction”. The encoder8 a encodes the encoding mode selected by the mode selector 21 andoutputs an encoded signal 9 a. The encoder 8 b encodes the outputdifference value and outputs an encoded signal 9 b.

The image encoding apparatus according to the 4th embodiment performsloss-less encoding without rounding the error and stores the input imagesignal 1 as the encoded and decoded pixel values up to the change pixelas described above, in the memory 3.

FIG. 8 is a drawing for explaining how the scanning directions areswitched by the image encoding apparatus according to the 4thembodiment. The image signal has correlations in the horizontal andvertical directions. The prior art image encoding method utilizes thesecorrelations for compression. Concerning the application of thecorrelation in the prior art technology, as can be seen in, for example,MMR, the encoding is carried out based on only a correlation in eitherthe horizontal direction or the vertical direction. However, if theimage is observed locally, either of the correlations in the horizontalor vertical direction is sometimes the strongest. For example, as shownin FIG. 8, if the correlation in the horizontal direction is strongerthan that in the vertical direction, the prediction error of the changepixel at the pixel position becomes smaller based on the prediction inthe vertical direction rather than based on the prediction in thehorizontal direction, whereby enabling the encoding efficiency to beimproved. Accordingly, switching the vertical-direction prediction andthe horizontal-direction prediction according to the nature of the imagelargely contributes to the improvement of the encoding efficiency.

As described above, in the image encoding apparatus according to the 4thembodiment, by including the horizontal scanners 40 a and 40 b, thevertical scanners 41 a and 41 b, the change pixel detectors 2 a and 2 b,the memory 3, the change pixel predictors 4 a and 4 b, and thedifference value calculators 5 a and 5 b, the prediction is performed inthe horizontal and vertical directions, and the difference value betweenthe predicted value and the detected result is then obtained for boththe directions; and by including the mode selector 21, the switchingunit 22, and the encoders 8 a and 8 b, the difference from theprediction by the horizontal scanning and the difference from theprediction by the vertical scanning are compared and the differencevalue which has the minimum code length is selected and encoded, wherebythe bit number required for encoding by utilizing the local change ofthe horizontal and vertical correlations can be reduced to a largeextent.

Note that, also in the image encoding apparatus according to the 4thembodiment, the input signal 1 is input block by block and the encodingmode is also selected for respective blocks. That is, the apparatusperforms adaptively switching the encoding based on the prediction bythe horizontal scanning and the encoding based on the prediction by thehorizontal scanning, block by block, whereby the above-mentioned effectis obtained.

Further, also in the image encoding apparatus according to the 4thembodiment as well as the 2nd embodiment, it is possible that the changepixel detector 2 and the change pixel predictors 4 a and 4 b output notthe distance (pixel number) to a change pixel, but a two-valued signalrepresenting the state of the change of the pixel, whereby the processload can be reduced.

Embodiment 5

An image decoding apparatus according to a fifth embodiment of thisinvention appropriately decodes the encoded signal which is efficientlyencoded by the image encoding apparatus according to the 4th embodiment.

FIG. 9 is a block diagram showing the structure of the image decodingapparatus according to the 5th embodiment of this invention. In thefigure, 40 b and 41 b are similar to those of FIG. 7, and the othernumerals are similar to those of the 3rd embodiment, and theirdescription is similar to those of the 3rd and 4th embodiments, sotherefore is omitted.

The operation of the image decoding apparatus according to the 5thembodiment as constructed above is explained. The image decodingapparatus according to the 5th embodiment receives the input signal 30 awhich is the signal 9 a into which the selected encoded mode has beenencoded in the image encoding apparatus according to the 4th embodiment,and the input signal 30 a is decoded in the decoder 31 a, and thepredicted mode signal indicating “horizontal direction” or “verticaldirection” is obtained. The decoder 31 a outputs the predicted mode intothe switching unit 32.

Also, the image decoding apparatus according to the 5th embodimentreceives the input signal 30 b which is the signal 9 b into which theselected difference value has been encoded in the image encodingapparatus according to the 4th embodiment, and the input signal 30 b isdecoded in the decoder 31 b, and the decoded difference value isobtained. The decoder 31 b outputs the decoded difference value into thedifference value addition means 11.

On the other hand, the horizontal scanner 40 b reads out the alreadyencoded and decoded reference image of the particular frame stored inthe memory 3, horizontally scans and outputs the reference image to thechange pixel predictor 4 a. The predictor 4 a predicts change pixels andoutputs the result as predicted change pixels to the switching unit 22.

On the other hand, the vertical scanner 41 b reads out the alreadyencoded and decoded reference image of the particular frame stored inthe memory 3, vertically scans the reference image to the change pixelpredictor 4 b and outputs the same. The predictor 4 b predicts changepixels and outputs the predicted change pixels to the switching unit 22.

The switching unit 22 into which the change pixel predictors 4 a and 4 boutput the predicted pixels, performs switching according to the inputpredicted mode signal. Accordingly, the switching unit 22 selects thepredicted change pixel based on the horizontal scanning output by thechange pixel predictor 4 a if the input predicted mode signal indicates“horizontal direction”, or selects the predicted change pixel based onthe vertical scanning output by the change pixel predictor 4 b if theinput predicted mode signal indicates “vertical direction”, and outputsthe predicted change pixel to the difference value addition means 11.

The difference value addition means 11 calculates a change pixel byadding the predicted change pixel obtained by the switching unit 22 tothe decoded difference value obtained from the decoder 31 b, and outputsthe result to the change pixel decoder 10. The change pixel decoder 10,based on the predicted change pixel of the change pixel prediction means4 a and the change pixel obtained by the difference value addition means11, encodes the pixel value therebetween. The result of this decoding isstored in the memory 3, and is output as a decoded image signal 34 fromthe image decoding apparatus according to the 5th embodiment.

As described above, the image decoding apparatus according to the 5thembodiment has the decoder 31 a which decodes the encoding mode of theencoded signal, the decoder 31 b which decodes the encoded signal of thedifference value, the change pixel prediction means 4 a which predictsthe change pixel based on the horizontal-direction scanning, the changepixel prediction means 4 b which predicts the change pixel based on thevertical-direction scanning, the difference value addition means 11which performs decoding based on the predicted change pixel, and thechange pixel decoder 10, whereby the switching unit performs switchingaccording to the predicted mode obtained by the decoder 31 a, namely theswitching unit adaptively switches the decoding based on thehorizontal-direction scanning and the decoding based on thevertical-direction scanning, according to the predicted modecorresponding to the encoding mode which has been used in encoding, andtherefore the encoded signal efficiently encoded in the 4th embodimentcan be appropriately decoded.

Note that in the 5th embodiment there is described the image decodingapparatus which is constructed based on the structure shown in FIG. 5 ofthe 3rd embodiment, however, the apparatus can be constructed based onthe structure shown in FIG. 6 of the 3rd embodiment, or as described inthe 3rd embodiment the switching unit can receive the output of thechange pixel decoder in the 5th embodiment, and it is also possible toperform appropriate decoding.

Also, in the 5th embodiment, when the encoded signal is such a signalthat is, block by block, encoded with the encoding modes selected forrespective blocks, the apparatus receives input signals block by block,and obtains the predicted modes for respective blocks, and performsprocesses block by block according to respective encoding modes, wherebythe encoded signal can be appropriately decoded.

Embodiment 6

An image encoding apparatus according to a 6th embodiment of thisinvention with greater efficiency encodes multi-valued image signals.

FIG. 10 is a block diagram showing the structure of the image encodingapparatus according to the 6th embodiment. In the figure, an inputsignal 1 a is input to the image encoding apparatus according to the 6thembodiment as a multi-valued signal. Thus, what is different from the1st embodiment is that the multi-valued signal is input and processedand that there is included two encoders. The other points are similar tothose of the 1st embodiment. The description of these is similar to the1st embodiment, and is therefore omitted.

A description is given of the image encoding apparatus according to the6th embodiment as constructed above. When the input signal 1 a is input,the change pixel detector 2, for this multi-valued input signal,compares the pixel value at the final encoding and the decoding positionwith the pixel value at the next position, and judges whether each pixelcorresponds to “change” or to “non-change”. Thereafter, a change pixelnumber, the number of pixels which is judged as “change”, is calculated,and compared with the given value. Here, the given value is assumed tobe 60. The pixel which is judged as “change” and of which the changepixel number is beyond 60 is defined as a change pixel, and the pixelvalue and position of the change pixel are output as a detected changepixel to the difference value calculator 5, the change pixel decoder 10and the encoder 8 a.

On the other hand, the change pixel predictor 4 reads out the alreadyencoded and decoded reference image of the particular frame stored inthe memory 3, and predicts a change pixel based on the particular inputsignal, and outputs the result as a predicted change pixel to thedifference value calculator 5, the difference value adder 11 and thechange pixel decoding means. The difference value calculator 5 subtractsthe predicted change pixel from the detected change pixel and obtainsthe difference value and outputs the difference value to the encoder 8 band difference adder 11. The difference value adder 11 adds the inputpredicted change pixel and the difference value, and outputs the resultto the change pixel decoder 10. The change pixel decoder 10 decodes thepixel values of pixels up to the change pixel and the pixel value of thechange pixel based on the input, and stores the result in the memory 3.

The encoders 8 a and 8 b encode the pixel values of the input changepixels and the difference values, and output the encoded signals 9 a and9 b, respectively.

As described above, in the image encoding apparatus according to the 6thembodiment having a structure similar to that of the 1st embodiment,whether there exists the change or not is judged pixel by pixel, thenumber of pixels which are judged as “change” is calculated, and if thenumber of pixels judged as “change” is equal to or greater than thethreshold, they are defined as the change pixel, whereby not only is itpossible to perform the similar encoding for only two-valued images, butalso for multi-valued images.

Embodiment 7

An image decoding apparatus according to a 7th embodiment of thisinvention decodes the encoded signal encoded by the image encodedapparatus according to the 6th embodiment and obtains a multi-valuedsignal.

FIG. 11 is a block diagram showing the structure of the image decodingapparatus according to the 7th embodiment. In the figure, a decoder 31 adecodes the encoded signal into which the pixel values of change pixelsare encoded. The decoder 31 b decodes the encoded signal in to which thepredicted difference values are encoded. The other points are similar tothose of FIG. 5. The description of these points is similar to those ofthe 3rd embodiment, and is therefore omitted.

A description is given of the image decoding apparatus according to the7th embodiment as constructed above. The image decoding apparatusaccording to the 7th embodiment receives the input signal 30 a which isthe signal 9 a into which the pixel values of change pixels have beenencoded in the image encoding apparatus according to the 6th embodiment,and the input signal 30 a is decoded in the decoder 31 a, and decodedpixel values are obtained and the decoded pixel values are output to thechange pixel decoder 10.

On the other hand, the image decoding apparatus according to the 7thembodiment receives the input signal 30 b which is the signal 9 b intowhich the predicted difference values have been encoded in the imageencoding apparatus according to the 6th embodiment, and the input signal30 b is decoded in the decoder 31 b, and decoded difference values areobtained and the decoded difference values are output to the changepixel decoder 10.

On the other hand, the change pixel predictor 4 reads out the alreadyencoded and decoded reference image stored in the memory 3, and predictsa change pixel based on the particular image signal to output thepredicted change pixel to the change pixel decoder 10 and differencevalue adder 11. The difference value adder 11 adds the input predictedchange pixel and the difference value, and outputs the result to thechange pixel decoder 10. The change pixel decoder 10 decodes the pixelvalues of pixels up to the change pixel and the pixel value of thechange pixel based on the input, and stores the result in the memory 3.

As described above, the image decoding apparatus according to the 7thembodiment has the decoder 31 a which decodes the encoded signal intowhich the pixel values of change pixels are encoded and the decoder 31 bwhich decodes the encoded signal into which the predicted differencevalues are encoded, whereby the encoded signal encoded by the imageencoding apparatus according to the 6th embodiment can be appropriatelydecoded to obtain a multi-valued image signal.

Embodiment 8

An image encoding apparatus according to an 8th embodiment of thisinvention receives an image signal consisting of a transparency signalindicating the ratio for synthesizing an image and a pixel value signal,as an input signal, and encodes the input signal with reference to areference image.

FIG. 12 is a block diagram showing the structure of the image decodingapparatus according to the 8th embodiment. In the figure, 60 a indicatesa pixel value signal. 60 b indicates a transparency signal. The pixelvalue signal and the transparency signal constitute a image signal andare input to the image encoding apparatus according to the 8thembodiment as input signals. 61 indicates a memory which temporarilystores data such as previously encoded and decoded image signals used asreference images. 62 a and 62 b indicate motion detectors which detectmotion with the reference images to output motion vectors. 63 a and 63 bindicate motion compensation units which perform motion compensationwith the image signal of the already encoded and decoded reference frameto generate reference pixel values. 64 a and 64 b indicate differencevalue calculators which calculate the difference value between the inputsignal and the motion-compensated signal, and output the differencevalue. 65 a and 67 b indicate encoders which encode the motion vectors.67 a and 65 b indicate encoders which encode the difference values. 66 aand 68 b indicate encoded signals into which the motion vectors areencoded. 67 a and 65 b indicate encoded signals into which thedifference values are encoded.

A description is given of the image encoding apparatus according to the8th embodiment as constructed above. The image encoding apparatusaccording to the 8th embodiment receives image signals, as the pixelvalue signal 60 a and the transparency signal 60 b. Here, thetransparency signal is such a signal as shown in FIG. 53(b) used forexplaining the prior art, and indicates what ratio is used forsynthesizing each pixel when it is combined with the other image. Thepixel value signal 60 a is input to the memory 61, the motion detector62 a and the difference value calculation means 64 a. The transparencysignal 60 b is input to the memory 61, the motion detector 62 b and thedifference value calculation means 64 b.

The motion detectors 62 a and 62 b perform detecting motions bycomparing the input signals with the already encoded and decoded pixelvalues contained by the reference image read out from the memory 61, andobtain motion vectors of each input signal.

The motion vectors of the pixel value signals obtained by the motiondetector 62 a are output to the encoder 65 a, the motion compensationunit 63 a and the memory 61. The motion compensation unit 63 a reads outthe pixel value indicated by the motion vector of the pixel value signalfrom the memory 61, and outputs the motion-compensated value of thepixel value signal into the difference calculator 64 a.

The difference calculator 64 a calculates the difference value betweenthe input pixel value signal and motion-compensated value and obtainsthe same, and outputs the difference value to the encoder 67 a. Themotion vector of the pixel value signal is encoded in the encoder 65 ato become encoded signal 66 a, while the difference value is encoded inthe encoder 67 a to become encoded signal 68 a.

Similarly, the motion vector of the transparency signal obtained fromthe motion detector 62 b is output to the encoder 67 b, the motioncompensation unit 63 b and the memory 61. The motion compensation unit63 b performs motion compensation for the transparency signal, andoutputs the obtained motion compensated value to the difference valuecalculator 64 a. On the other hand, the difference value calculator 64 bout puts the obtained difference value to the encoder 67 a similarly tothe 64 a. Similar to the pixel value signal, the motion vector of thetransparency signal is encoded in the encoder 67 b to become the encodedsignal 68 b, and the difference value is encoded in the encoder 65 b tobecome the encoded signal 66 b. The 8th embodiment is an example of areversible encoding, so that the encoded input signal is stored in thememory 61 and is used for encoding subsequent image signals (not shown).

As described above, the image encoding apparatus according to the 8thembodiment has the motion detector 62 a, motion compensation unit 63 a,difference value calculator 64 a, encoder 65 a and encoder 67 a, all ofwhich process the pixel value signal 60 a, and has the motion detector62 b, the motion compensation unit 63 b, the difference value calculator64 b, the encoder 65 b and the encoder 67 b, all of which process thetransparency signal 60 b, whereby the pixel value signal and thetransparency signal are separately subjected to the motion detection toobtain the motion vectors and are also subjected to the motioncompensation.

As described in the Prior Art section, in the prior art image encoding,when the image consisting of the shape information and pixel valueinformation is encoded, concerning the shape information used for theimage synthesis, in order to improve the encoding efficiency, the motioncompensation for the shape information is carried out using the motionvector of the pixel value information. Accordingly, when encoding such asignal as the input image signal of the 8th embodiment, the motioncompensation encoding for the transparency signal is performed using themotion vector of the pixel value signal. However, although thetransparency signal is a signal representing the shape of the object,the motion vector does not always agree with the motion vector of thepixel value signal. For example, although the shape of a rotating discis invariable, the drawings on the disc move. Hence, in this case, asthe motion vector of the pixel value signal is much different from thatof the transparency signal, when the motion compensation is performedfor the transparency signal using the motion vector of the pixel valuesignal, the motion error becomes large and the code length of thedifference value increases, resulting in the reduction of the encodingefficiency.

As opposed to this, the image encoding apparatus according to the 8thembodiment performs motion compensation using another detected motionvectors rather than the motion vector of the pixel value signal andthereby obtains a more precise approximation to the input transparencysignal by the motion compensated signal and improves the encodingefficiency as a result of the reduction of the motion compensationerror.

Also, in the image encoding apparatus according to the 8th embodiment,the input signal can be input block by block, and the motioncompensation and the encoding can be performed for respective blocks,whereby the above-mentioned effect is obtained.

Embodiment 9

An image encoding apparatus according to a 9th embodiment of thisinvention, similarly to the 8th embodiment, receives an image signalconsisting of a transparency signal and a pixel value signal, as inputsignals, and encodes the input signal with reference to a referenceimage.

FIG. 13 is a block diagram showing the structure of the image encodingapparatus according to the 8th embodiment. In the figure, the numeralsindicate the same as those in FIG. 12, and the description is similar tothat for the embodiment 8. The difference from the structure of theimage encoding apparatus according to the 8th embodiment is that, in theimage encoding apparatus according to the 9th embodiment, the motiondetector 62 a obtains the motion vector from the pixel value signal 60 aand outputs the motion vector to the motion detector 62 b for thetransparency signal 60 b, and the motion detector 62 b detects themotion from in the vicinity of the motion vector of the input pixelvalue signal.

Also, the operation of the image encoding apparatus according to the 9thembodiment is similar to that of the 8th embodiment except the motiondetector 62 a performs the above-mentioned output and the motiondetector 62 b performs the above-mentioned detection.

As described above, in the image encoding apparatus according to the 9thembodiment, based on the structure of the 8th embodiment, the motiondetector 62 a obtains the motion vector from the pixel value signal 60 aand outputs the motion vector to the motion detector 62 b for thetransparency signal 60 b, and the motion detector 62 b detects themotion of the transparency from in the vicinity of the motion vector ofthe input pixel value signal. That is, it is possible that when themotion of the transparency signal is detected, the result of the motiondetection of the pixel value signal is used.

Although the motion vectors of the pixel value signal and thetransparency signal are sometimes largely different from each other asshown in the 8th embodiment, they are almost the same in most images.Therefore, when the motion vector of the transparency signal isdetected, if the motion vector of the transparency signal is detectedonly in the vicinity of the motion vector of the pixel value signal,compared to the case of detecting independently of the pixel valuesignal, the calculation times required for the motion detection isreduced. Note that, compared to the case of the motion detectionindependent of the pixel value signal the number of motion vectors whichcan be selected is restricted, so that the motion compensation error ofthe transparency signal is more or less increased, but the ratio isslight. Accordingly, the image encoding apparatus according to the 9thembodiment as well as the 8th embodiment performs the appropriate motioncompensation for each signal, resulting in improving the encodingefficiency and reducing the calculation times of the motion detection.

Note that, in the image encoding apparatus according to the 9thembodiment, although the motion vector of the pixel value signal is usedfor the motion detection of the transparency signal, it is possible thatbased on the structure of the 8th embodiment, the motion detector 62 bobtains the motion vector from the transparency signal 60 b and outputsthe motion vector to the motion detector 62 a for the pixel value signal60 a, and the motion detector 62 a detects the motion of the pixel valuesignal from in the vicinity of the motion vector of the inputtransparency signal. That is, it is possible that when the motion of thepixel value signal is detected, the result of the motion detection ofthe transparency signal is used. Also, the calculation times of themotion detection can be reduced.

Also, similarly to the 8th embodiment, the block-by-block encoding ispossible.

Embodiment 10

An image encoding apparatus according to a 10th embodiment of thisinvention, similarly to the 8th and 9th embodiments, receives an imagesignal consisting of a transparency signal and a pixel value signal, asan input signal, and encodes the input signal with reference to areference image.

FIG. 13 is a block diagram showing the structure of the image decodingapparatus according to the 8th embodiment. In the figure, 70 indicates adifference calculator for motion vectors which obtains the differencevector between the motion vector of the pixel value signal obtained fromthe motion detector 62 a and the motion vector of the transparencysignal obtained from the motion detector 62 b. Though the encoder 67 bencodes the motion vector of the transparency signal in the 8thembodiment, the encoder 67 b encodes the difference vector of the motionvector obtained by the difference value calculator 70 in the 10thembodiment. The other numerals indicate the same as those in FIG. 12,and the description is similar to that in the 8th embodiment.

The operation of the image encoding apparatus according to the 10thembodiment is similar to that of the 8th embodiment except that themotion detectors 62 a and 62 b output motion vectors to the differencevalue calculator 70, and the difference value calculator 70 obtains theabove-mentioned difference vector to the encoder 67 b and outputs thesame, and the encoder 67 b encodes the difference vector of the motionvector.

As described above, in the image encoding apparatus according to the10th embodiment, based on the structure of the image encoding apparatusaccording to the 8th embodiment, the difference value calculator 70 formotion vectors is added to the structure, and thereby, instead ofencoding the motion vector of the transparency signal, the differencevector between the motion vectors of the pixel value and thetransparency vectors is encoded. As described in the 9th embodiment,since the motion vectors of both the signals often correlate, if thedifference vector between the motion vectors of both the signals isencoded, the frequency of occurrence of the difference vector isconcentrated in the neighborhood of 0 vector, whereby, performing thevariable-length encoding which gives a code of a short code length tothe difference vector in the neighborhood of 0 vector, the encodingefficiency is improved and the encoding can be performed with a smallerbit number.

Note that, in the image encoding apparatus according to the 10thembodiment, although the difference vector of the motion vectors of boththe signals are encoded instead of the motion vectors of thetransparency signal, there can be provided the structure in which thedifference vector obtained by the difference value calculator 70 isoutput to the encoder 65 a instead of 67 b. If the difference vector ofthe motion vectors of both the signals is encoded instead of encodingthe motion vector of the pixel value signal, the same result can beobtained.

Also, similar to the 8th embodiment, the block-by-block encoding ispossible.

Embodiment 11

An image decoding apparatus according to a 11th embodiment of thisinvention appropriately decodes the encoded signal efficiently encodedby the image encoding apparatus according to the 8th embodiment.

FIG. 15 is a block diagram showing the structure of the image decodingapparatus according to the 11th embodiment. In the figure, 82 a and 82 bindicate encoded signals corresponding to the encoded signals 68 a and66 b in FIG. 12, respectively, into which the difference values in thepixel value signal and in the transparency signal are encodedrespectively. 80 a and 80 b indicate encoded signals corresponding tothe encoded signals 66 a and 68 b in FIG. 12, respectively, into whichthe motion vectors in the pixel value signal and in the transparencysignal are encoded respectively. 83 a and 83 b indicate encoders whichencode the difference values in the pixel value signal and in thetransparency signal, and output the encoded difference values in thepixel value signal and in the transparency signal, respectively. 81 aand 81 b indicate encoders which encode the motion vectors of the pixelvalue signal and of the transparency signal, and output the encodedmotion vectors of the pixel value signal and of the transparency signal,respectively. 61 indicates a memory which temporarily stores data suchas the already encoded and decoded image signal used as a referenceimage. 63 a and 63 b indicate motion compensation units which performthe motion compensation using the encoded motion vectors. 84 a and 84 bindicate difference value adders which perform the addition processingusing the encoded difference values. 85 a and 85 b indicate encodedimage signals.

The operation of the image decoding apparatus according to the 11thembodiment as constructed above is explained. The signals 68 a and 66 binto which the difference values of the pixel value signal and of thetransparency signal are encoded by the image encoding apparatusaccording to the 8th embodiment respectively, are input to the imagedecoding apparatus according to the 11th embodiment as the input signals82 a and 82 b, and are decoded by the decoders 83 a and 83 b, and areoutput to the difference value calculators 84 a and 84 b as thedifference values of the pixel value signal and the transparency signal,respectively. The signals 66 a and 68 b into which the motion vectors ofthe pixel value signal and of the transparency signal are encoded by theimage encoding apparatus according to the 8th embodiment respectively,are input to the image decoding apparatus according to the 11thembodiment as the input signals 80 a and 80 b, and are decoded by thedecoders 81 a and 81 b, and are output to the motion compensation units63 a and 63 b as the motion vectors of the pixel value signal and thetransparency signal, respectively.

The motion compensation units 63 a and 63 b read out pixel valuesindicating the respective input motion vectors from the memory 61, andperform the motion compensation, and output the motion compensatedvalues into the difference value adder 84 a and 84 b, respectively. Thedifference value adders 84 a and 84 b add the respectively input encodeddifference value and motion compensated value, and output the decodedimage signals 85 a and 85 b, respectively, which are stored in thememory 61.

As described above, the image decoding apparatus according to the 11thembodiment has the decoder 81 a, the decoder 83 a, the motioncompensation unit 63 a, and the difference value calculator 84 a, all ofwhich perform the process of the encoded signal of the pixel valuesignal, and has the decoder 81 b, the decoder 83 b, the motioncompensation unit 63 b, and the difference value calculator 84 b, all ofwhich perform the process of the encoded signal of the transparencysignal, whereby the encoded signals 80 a and 82 a of the pixel valuesignal, and the encoded signals 80 b and 82 b of the transparency signalcan be separately subjected to the decoding process, whereby decodingcan be appropriately performed to obtain the image signal.

Note that, in the image decoding apparatus according to the 11thembodiment, although the encoded signal encoded by the image encodingapparatus according to the 8th embodiment is encoded, the encoded signalobtained by the image encoding apparatus according to the 9th embodimentcan be appropriately decoded.

Also, the signals which have been input block by block and encoded forrespective blocks in the 8th and 9th embodiment can be received block byblock to be appropriately decoded.

Embodiment 12

An image decoding apparatus according to a 12th embodiment of thisinvention appropriately decodes the encoded signal efficiently encodedby the image encoding apparatus according to the 10th embodiment.

FIG. 16 is a block diagram showing the structure of the image decodingapparatus according to the 12th embodiment. In the figure, 86 indicatesa difference value adder for motion vectors which adds a decoded motionvector and a decoded difference motion vector. The other numerals aresimilar to those in FIG. 15, and the description is similar to that inthe 11th embodiment and is therefore omitted here.

The operation of the image decoding apparatus according to the 12theembodiment as constructed above is described. The decoder 81 a outputsthe decoded motion vector of the pixel value signal obtained by decodingthe input signal 80 a, to the motion compensation unit 63 a and thedifference adder 86 for motion vectors. The decoder 80 b receives, notthe encoded signal of the motion vector of the transparency signal inthe 11th embodiment, but the encoded signal 68 b of the differencemotion vector in the 10th embodiment. The decoder 80 b obtains, not themotion vector of the transparency signal by decoding in the 11thembodiment, but the difference vector, and outputs the decodeddifference motion vector to the difference adder 86 for motion vectors.The output decoded difference motion vector is the difference vectorbetween the motion vectors of the pixel value signal and thetransparency signal. Therefore, by adding the difference vector with thedecoded motion vector of the pixel value signal in the difference valueadder 86, the motion vector of the transparency signal is obtained. Thedecoded motion vector of the transparency signal is output to the motioncompensation unit 63 b.

The other part of the operation is the same as the process of the imagedecoding apparatus according to the 11th embodiment. The decoded signal85 a of the pixel value signal and decoded signal 85 b of thetransparency signal are the outputs of the apparatus.

As described above, the image decoding apparatus according to the 12thembodiment has the structure which is based on the structure of theimage decoding apparatus according to the 11th embodiment and which isadded to the difference value adder 86 for motion vectors, and therebyperforms addition of the decoded motion vector and the decodeddifference vector, whereby the encoded signal output by the 10thembodiment which outputs the encoded signal of the difference vector asan encoded signal can be appropriately decoded.

Also, it is possible to respond in the situation whereby the encoding isperformed block by block as in the 10th embodiment, similar to in the11th embodiment.

Embodiment 13

An image encoding apparatus according to a 13th embodiment of thisinvention receives an image signal with blocked shapes which consists ofthe shape signal indicating the shape of the object and whether thepixel value of pixels is significant or not, and the pixel value signal,as an input signal, and encodes the input signal with reference to areference image.

FIG. 17 is a block diagram showing the structure of the image encodingapparatus according to the 13 embodiment. In the figure, 60 a indicatesa pixel value signal. 60 b indicates a shape signal. 60 a and 60 bconstitute the image signal and are input to the image encodingapparatus according to the 8th embodiment as input signals. 69 a and 69b indicate decoders which decode the encoded signals of the differencevalues output by the encoders 67 a and 65 b. 75 a and 75 b indicatedifference value adders which add the decoded difference value and themotion compensated value, and the result is stored in the memory 61. Theother numerals are similar to those in FIG. 12, and the description issimilar to that in the 8th embodiment and is therefore omitted here.

A description is given of the operation of the image encoding apparatusaccording to the 13th embodiment as constructed above. The image signalwith blocked shapes, the input signal, is input to the image encodingapparatus according to the 13th embodiment as the pixel value signal 60a and the shape signal 60 b. Here, the shape signal is the one shown inFIG. 53 used in the Prior Art section, consisting of the two-valuedinformation shown in FIG. 53(c) or multi-valued information shown inFIG. 53(d). In the case of the multi-valued information, it is similarto the transparency signal in the 8th embodiment.

In the image encoding apparatus according to the 13th embodiment, by theprocess similar to that in the 8th embodiment, the pixel value signaland the shape signal are encoded, and thereby the encoded signal 66 a ofthe motion vector of the pixel value signal, the encoded signal 68 a ofthe difference value of the pixel value signal, the encoded signal 66 bof the motion vector of the shape signal and the encoded signal 68 b ofthe difference value of the shape signal are obtained.

Although the encoded signal is input to the memory 61 in the apparatusaccording to the 8th embodiment, in the 13 embodiment the encodeddifference values are respectively decoded in the decoders 69 a and 69b, and are output to the difference value adders 75 a and 75 b, and areadded to the motion compensated values output by the motion compensationunits 63 a and 63 b in the difference value adders 75 a and 75 b, andare input to the memory 61. Accordingly, the reference image used forthe encoding is encoded and decoded, and is added to the motioncompensated value, which is the difference from the 8th embodiment.

As described above, the image encoding apparatus according to the 13thembodiment has the structure which is based on the structure of theimage encoding apparatus according to the 8th embodiment and which isadded to the decoders 69 a and 69 b and the difference value adders 75 aand 75 b, and therefore, similarly to the 8th embodiment, by reducingthe motion compensation error the improvement of the encoding efficiencyis realized, and moreover, though there accompanies a slight increase inthe processing load, with the use of the more appropriate signal whichis encoded and decoded as a reference image, and is added to the motioncompensated value, a further reduction of the motion compensation errorcan be realized.

Note that, the encoded signal output by the image encoding apparatusaccording to the 13th embodiment, similarly to the 8th embodiment, inthe image decoding apparatus according to the 11th embodiment, isappropriately encoded.

Embodiment 14

An image encoding apparatus according to a 14th embodiment of thisinvention, similar to the 13th embodiment, receives an image signalconsisting of a shape signal and a pixel value signal as an inputsignal, and referring to a reference image, encodes this input signal.

FIG. 18 is a block diagram showing the structure of the image encodingapparatus according to the 14th embodiment of this invention. In thefigure, the numerals are the same as those in FIG. 17, and thedescription is similar to that in the 13 embodiment. in the imageencoding apparatus according to the 14th embodiment, similar to the 9thembodiment, the motion detector 62 a for the pixel value signal 60 aoutputs the motion vector of the obtained pixel value signal to themotion detector 62 b for the transparency signal 60 b, and the motiondetector 62 b performs the motion detection of the transparency signalin the vicinity of the motion vector of the input pixel value signal,which is the difference from the structure of the image encodingapparatus according to the 13th embodiment.

Also, the operation of the image encoding apparatus according to the14th embodiment is similar to that of the 13 embodiment, except that themotion detector 62 a performs the above-mentioned output and the motiondetector 62 b performs the above-mentioned detection.

As described above, in the image encoding apparatus according to the14th embodiment, based on the structure of the 13th embodiment, themotion detector 62 a for the pixel value signal 60 a outputs the motionvector of the obtained pixel value signal to the motion detector 62 bfor the shape signal 60 b, and the motion detector 62 b performs themotion detection of the shape signal in the vicinity of the motionvector of the input pixel value signal, and thereby similar to the 9thembodiment, at the time of the motion detection of the shape signal,using the result of the motion detection of the pixel value signal, thecalculation times of the motion detection can be reduced.

Note that, the possible structure in which the motion vector of thepixel value signal can be detected in the vicinity of the motion vectorof the shape signal, is similar to that of the 9th embodiment, and it issimilar to the 13th embodiment in which the encoded signal is obtainedby the image encoding apparatus according to the 14th embodiment.

Embodiment 15

An image encoding apparatus according to a 15th embodiment, similarly tothe 13th and 14th embodiments, receives an image signal consisting of ashape signal and a pixel value signal as an input signal, and referringto a reference image, encodes this input signal.

FIG. 19 is a block diagram showing the structure of the image encodingapparatus according to the 15th embodiment. In the figure, thedifference calculator 70 of the motion vector is similar to that of the10th embodiment shown in FIG. 13. And, the encoder 67 b, similarly tothat in the 10th embodiment, encodes the difference vector of the motionvector obtained by the difference value calculator 70. The othernumerals indicate the same as those in FIG. 17, and the description issimilar to that of the 13 embodiment.

Concerning the operation of the image encoding apparatus according tothe 15th embodiment, the motion detectors 62 a and 62 b output themotion vectors to the difference value calculator 70, and the differencevalue calculator 70 obtains the above-mentioned difference vector tooutput to the encoder 67 b, and the encoder 67 b encodes the differencevector of the motion vector, which is similar to that of the 10thembodiment, while the other operations are similar to those of the 13thembodiment.

As described above, the image encoding apparatus according to the 15thembodiment is based on the structure of the image encoding apparatusaccording to the 13th embodiment and is added to the difference valuecalculator 70 of the motion vector, and thereby encodes the differencevector between the motion vector of the pixel value signal and themotion vector of the shape signal instead of encoding the motion vectorof the shape signal. Accordingly, similar to the 10th embodiment, theperformance of the variable-length encoding enables the furtherimprovement of the encoding efficiency to be realized.

Note that the case of encoding the difference vector instead of encodingthe motion vector of the pixel value signal is possible, which issimilar to the 10th embodiment.

Also, the encoded signal output by the image encoding apparatusaccording to the 15th embodiment can be, similarly to that in the 10thembodiment, appropriately decoded by the image decoding apparatusaccording to the 12th embodiment.

Embodiment 16

An image encoding apparatus according to a 16th embodiment, similar tothe 13th to 15th embodiments, receives an image signal consisting of ashape signal and a pixel value signal as an input signal, and referringto a reference image, encodes this input signal.

FIG. 20 is a block diagram showing the structure of the image encodingapparatus according to the 16th embodiment. In the figure, 90 indicatesthe motion detector judgment unit which receives the input shape signal60 b and the motion vectors of the pixel value signal output by themotion detector 62 a, and judges the propriety of the motioncompensation of the shape signal with the motion vector of the pixelvalue signal, and according to the judgment, outputs the instructionwhether the motion detection will be performed or not, to the motiondetector 62 b.

The operation of the above-constructed image encoding apparatusaccording to the 16th embodiment is described. The processing of thepixel value signal 60 a input to the image encoding apparatus accordingto the 16th embodiment, except for the point that the motion vector ofthe pixel value signal obtained in the motion detector 62 a is alsooutput to the motion detection judgment unit 90, is similar to the 13thembodiment, and thereby the encoded signal 66 a of the motion vector ofthe pixel value signal and the encoded signal 68 a of the differencevalue of the pixel value signal are obtained.

On the other hand, the input shape signal 60 b is first input to themotion detection judgment unit 90. The motion detection judgment unit 90performs the motion compensation of the input shape signal 60 b usingthe motion vector of the input pixel value signal, and compares themotion-compensated shape signal with the input shape signal 60, andjudges whether both the shape signals have agreement or not. Thereafter,if there exists agreement, the motion vector of the pixel value signalis output to the motion detector 61 b, and the motion detector 61 b doesnot perform the motion detection of the shape signal and the inputmotion vector of the pixel value signal is substituted for the motionvector of the shape signal. As opposed to this, if there does not existagreement in the result of the comparison of the motion detectionjudgment 90, the motion detection judgment 90 outputs such aninstruction to the motion detector 61 b that the motion detector 61 bperforms the motion detection, and the motion vector is calculated bythe motion detector 61 b. For the shape signal, the remaining processesare similar to those of the 13th embodiment, and the encoded signals 66b and 68 b are obtained.

As described above, the image encoding apparatus according to the 16thembodiment has the structure of the image encoding apparatus accordingto the 13th embodiment which is added to the motion detection judgmentunit 90, and judges the propriety of the performance of the motioncompensation of the input shape signal using the motion vector of theinput pixel value signal, and if the result of the judgment is that itis possible, the motion detection for the input shape signal is notperformed and thereby the omission of the calculation realizes thereduction of the processing load. If the result of the judgment is thatit is impossible, the motion detection for the input shape signal isperformed similarly to the 13th embodiment and thereby the encodingefficiency and picture quality of the encoded signal are not affected.

Note that, in the 16th embodiment, although the detection of the shapesignal is not performed when the motion-compensated shape signal and theinput shape signal have agreement, if the slight degradation of theencoding efficiency due to the increase in the motion compensation erroris tolerable, it is also possible that the motion detection is notperformed when the error due to the motion compensation in the judgmentis equal to or smaller than the given value, and thereby a furtherreduction of the processing load can be realized.

Embodiment 17

An image encoding apparatus according to a 17th embodiment, similar tothe 13th to 16th embodiments, receives an image signal consisting of ashape signal and a pixel value signal as an input signal, and referringto a reference image, encodes this input signal. FIG. 21 is a blockdiagram showing the structure of the image encoding apparatus accordingto the 17th embodiment. In the figure, 93 indicates the switchingjudgment unit which receives the motion vectors of the pixel valuesignal and shape signal, and similarly to 16th embodiment, judges thepropriety of the motion compensation of the shape signal using themotion vector of the pixel value signal, and according to the judgment,gives an instruction to the switching unit 94. The switching unit 94,according to the instruction of the switching judgment unit 93, switchesthe motion vector of the pixel value signal and the motion vector of theshape signal for the output to the difference value calculator 70. Thememory 95 for the motion vector performs the temporal storage in orderto input the motion vector output by the switching unit 94 to thedifference value detector 70 after a delay. The other numerals aresimilar to those of FIG. 19, and the description is similar to that ofthe 15th embodiment.

The operation of the image encoding apparatus according to the 17thembodiment is similar to that of the 15th embodiment, except for thataccording to the judgment of the switching judgment unit 93, the twoembodiments differ in the difference motion vector to be obtained by thedifference value calculator 70, so the operation of that alone isdescribed.

The switching judgment unit 93 receives and compares the encoded signalof the motion vector of the pixel value signal and the motion vector ofthe shape signal, both of which are of the immediately previous encodedinput signal, and checks whether the motion vector of the shape signalof the immediately previous encoded input signal is already encoded ornot. That is, by processing the immediately previous encoded inputsignal, it is checked whether the encoded signal of the differencemotion vector obtained from the encoder 67 b has been the differencevector between the motion vector of the pixel value signal and themotion vector of the shape signal, or the difference vector between themotion vectors of the shape signals. Thereafter, when the differencevector of the motion vectors of the shape signals has been encoded, bysending an instruction to the switching unit 94, the motion vectordetected from the shape signal is input to the memory 95 for delay.Accordingly, in this case, the encoder 67 b obtains the differencevector between the immediately previous encoded motion vector of theshape signal obtained from the memory 95 for delay and the motion vectordetected from the input shape signal, and encodes the difference vector.On the other hand, when the difference vector between the motion vectorsof the pixel value and shape signals of the immediately previous inputsignal has been encoded, by sending an instruction to the switching unit94, similarly to the 15th embodiment, the difference vector of themotion vectors of both the signals is to be encoded.

As described above, the structure of the image encoding apparatusaccording to the 17th embodiment is based on the structure of the imageencoding apparatus according to the 15th embodiment and is added to theswitching judgment 93, the switching unit 94 and the memory 95 fordelay, and thereby when the motion vector of the immediately previousshape signal is encoded, the difference vector between the motion vectorand detected motion vector are obtained and encoded, and the encodingefficiency can be improved by utilizing the difference between themotion vectors of the shape signals which highly correlate.

Note that, in the 17th embodiment, although the judgment and theencoding of the difference vector are performed for the motion vector ofthe shape signal, the judgment and the encoding of the difference vectorcan be also performed for the motion vector of the pixel value signal,and similarly, an improvement of the encoding efficiency can berealized.

Embodiment 18

An image encoding apparatus according to an 18th embodiment of thisinvention receives image signals consisting of at least one of eitherthe shape information or the transparency information, and the pixelinformation, as input image signals, and encodes the image signalsaccording to the mode suitable for respective image signals.

FIG. 22 is a block structure showing the structure of the image encodingapparatus according to the 18th embodiment. In the figure, 101 indicatesthe input image signal which consists of at least one of either theshape information or the transparency information, and the pixelinformation. 102 indicates the blocking unit which blocks the inputimage signal 101 and outputs the blocked shape signal 103, the blockedtransparency signal 105 and the blocked pixel value signal 107. 110indicates the shape encoding mode judgment unit, and 114 indicates thetransparency encoding mode judgment unit, and 116 indicates the pixelvalue encoding mode judgment unit, which judges the respective encodingmodes suitable for the shape signal 103, the transparency signal 105 andthe pixel value signal 107, and outputs the shape encoding mode 111, thetransparency encoding mode 115 and the pixel value encoding mode 119.112 indicates the shape encoder, 116 indicates the transparency encoderand 120 indicates the pixel value encoder, all of which encoderespective signals according to each judgment unit, and output the shapeencoded signal 113, the transparency encoded signal 117 and the pixelvalue encoded signal 121, respectively. 122 indicates the mode encoderwhich collectively encodes all of the encoding modes 111, 115 and 119,and outputs the encoded mode signal 123.

The operation of the above-constructed image encoding apparatusaccording to the 18th embodiment is explained. Initially, the inputimage signal 101 consisting of the shape information, the transparencyinformation and the pixel value information is input to the imageencoding apparatus according to the 18th embodiment. Here, thetransparency information and the shape information are explainedreferring to FIG. 53 used in the Prior Art section. The transparencyinformation represents the ratio of each pixel to be synthesized whenthe image shown in FIG. 53(a) is combined with another image, andbasically is multi-valued information such as what is shown in FIG.53(d). The shape information is two-valued information such as what isshown in FIG. 53(c), which is two-valued transparency information with 0and non-0 indicating that the object “exists/non-exists”. Note that whenthe transparency information has only two of the perfect transparencyand the perfect opacity, the information can be represented only by theshape signal as described above and thereby the transparency informationis not required. Accordingly, in this case, only the shape informationand the pixel value information are encoded or decoded.

The blocking unit 102 blocks the input image signal 101 by integrating aplurality of pixels based on the corresponding relation between thepixels of the shape information-transparency information and the pixelvalue information, and outputs the blocked shape signal 103, the blockedtransparency signal 105 and the blocked pixel value signal 107. Theshape signal 103 is output to the shape encoding mode judgment unit 110and the shape encoder 112, and the transparency signal 105 is output tothe transparency encoding mode judgment unit 114 and the transparencyencoder 116, and the pixel value signal 107 is output to the pixel valueencoding mode judgment unit 118 and the pixel value encoder 120.

The shape encoding mode judgment unit 110, the transparency encodingmode judgment unit 114 and the pixel value encoding mode judgment unit118 judge suitable encoding modes for the input shape signal 103respectively, the transparency signal 105 and the pixel value signal 107respectively, and output the shape encoding mode 111, the transparencyencoding mode 115 and the pixel value encoding mode 119. Each encodingmode is output to each encoding mode unit, and to the mode encoding unit122.

The shape encoder 112, the transparency encoder 116 and the pixel valueencoder 120 output the respective input signals according to each of theinput encoding modes, and output the shape encoded signal 113, theencoded transparency signal 117 and the encoded pixel value signal 121.On the other hand, the mode encoder 122 collectively encodes all of theinput encoding modes, and outputs the encoded mode signal 123. The shapeencoded signal 113, the encoded transparency signal 117, the encodedpixel value signal 121 and the encoded mode signal 123 are the encodedoutputs of the image encoding apparatus according to the 18thembodiment.

As described above, the encoded outputs of the image encoding apparatusaccording to the 18th embodiment has the blocking unit 101 which blocksthe input image signal and separates the input image signal into theshape signal, the transparency signal and the pixel value signal andoutputs these signals, and the encoding mode judgment units 110, 114 and118 which judge the respective encoding modes suitable for each signal,and the encoder 112, 116 and 120 which encode each signal according toeach encoding mode, and the mode encoder 122 which collectively encodesall of the encoding modes, and thereby it is possible that the encodingis performed according to the mode suitable for each separated signaland all of the information related to the selected mode is collectivelyencoded. Since the shape information, the transparency information andthe pixel value information often have mutual correlation, the sameencoding mode is likely to be selected. Therefore, by performing thevariable-length encoding wherein the codes given the same mode are tohave the short code length, which results in the possible reduction ofthe bit number of the encoded signal.

Embodiment 19

A image encoding apparatus according to a 19th embodiment of thisinvention receives image signals consisting of at least one of eitherthe shape information or the transparency information, and the pixelinformation, as input image signals, and encodes the image signalsaccording to the respective modes suitable for each image signal.

FIG. 23 is a block structure showing the structure of the image encodingapparatus according to the 19th embodiment. In the figure, the shapeencoding mode judgment unit 110 judges the encoding mode suitable forthe shape signal 103, and outputs the result of the judgment as theencoding mode to the shape encoder 112 and the mode encoder 122, andalso to the transparency encoding mode judgment 130 and the pixel valueencoding mode judgment unit 132. Thereafter, the transparency encodingmode judgment 130 carries out judgment, referring to the input shapeencoding mode 111, and outputs the result of the judgment as theencoding mode to the transparency encoder 116 and the mode encoder 122,and also to the pixel value encoding mode judgment unit 132. The pixelvalue encoding mode judgment unit 132 carries out judgment, referring tothe input shape encoding mode 111 and the transparency encoding mode115.

The operation of the image encoding apparatus according to the 19thembodiment is similar to that of the 18th embodiment except thejudgments of the respective mode judgment units, and similarly, outputsthe shape encoded signal 111, the encoded transparency signal 117, theencoded pixel value signal 121 and the encoded mode signal 123.

As described above, the image encoding apparatus according to the 19thembodiment has the transparency encoding mode judgment unit 130 whichjudges the encoding mode of the transparency signal with reference tothe shape encoding mode, and the pixel value encoding mode judgment unit132 which judges the encoding mode of the pixel value signal withreference to both the shape encoding mode and the transparency encodingmode, and thereby the selected modes are likely to be the same.Accordingly, in the mode encoder 122 in which a shorter code is given inthe case that the modes are the same, the efficiency of thevariable-length encoding can improve more than in the 18th embodimentand can reduce the bit number of the encoded mode signal, which is theobtained result.

Embodiment 20

An image encoding apparatus according to a 20th embodiment improves theencoding efficiency of the encoded mode signal, similarly to that of the19th embodiment.

FIG. 24 is a block structure showing the structure of the image encodingapparatus according to the 20th embodiment. in the figure, the pixelvalue encoding mode judgment unit 118 judges the encoding mode suitablefor the pixel value signal 107, and outputs the result of the judgmentas the encoding mode to the pixel value encoder 120 and the mode encoder122, and also to the transparency encoding mode judgment 136 and theshape encoding mode judgment unit 138. Thereafter, the transparencyencoding mode judgment 136 carries out judgment, referring to the inputpixel value encoding mode 119, and outputs the result of the judgment asthe encoding mode to the transparency encoder 116 and the mode encoder122, and also to the shape encoding mode judgment unit 138. The shapeencoding mode judgment unit 138 carries out judgment, referring to theinput pixel value encoding mode 119 and the transparency encoding mode115.

The operation of the image encoding apparatus according to the 20thembodiment is similar to that of the 18th embodiment except thejudgments of the respective mode judgment units, and similarly, outputsthe shape encoded signal 113, the encoded transparency signal 117, theencoded pixel value signal 121 and the encoded mode signal 123.

As described above, the image encoding apparatus according to the 20thembodiment has the transparency encoding mode judgment unit 136 whichjudges the encoding mode of the transparency signal with reference tothe pixel value encoding mode, and the shape encoding mode judgment unit138 which judges the encoding mode of the shape signal with reference toboth the pixel value encoding mode and the transparency encoding mode,and thereby the selected modes are likely to be the same. Accordingly,in the mode encoder 122 in which shorter codes are given in the casethat the modes are the same, the efficiency of the variable-lengthencoding can improve more than in the 18th embodiment and can reduce thebit number of the encoded mode signal, which is the obtained result.

Embodiment 21

An image decoding apparatus according to a 21st embodiment of thisinvention appropriately encodes the encoded signal encoded by the imageencoding apparatus according to the 18th embodiment.

FIG. 25 is a block structure showing the structure of the image decodingapparatus according to the 21st embodiment. In the figure, input signals113, 117, 119 and 123 are the shape encoded signal 113, the encodedtransparency signal 117, the encoded pixel value signal 119 and theencoded mode signal 123, respectively, all of which are output by theimage encoding apparatus according to the 18th embodiment. 150 indicatesthe mode decoder which decodes the encoded mode signal 123, and outputsthe shape encoding mode 151, the transparency encoding mode 153, and thepixel value encoding mode 155. 156 indicates the shape decoder, 158indicates the transparency decoder and 160 indicates the pixel valuedecoder, which encode the shape encoded signal 113, the encodedtransparency signal 117 and the encoded pixel value signal 119,respectively, according to the encoding modes input from the modedecoder 150, and output the decoded shape signal 157, the decodedtransparency signal 159 and the decoded pixel value signal 161,respectively. 162 indicates the reverse blocking unit which receives andintegrates the decoded shape signal 157, the decoded transparency signal159 and the decoded pixel value signal 161, and outputs the decodedimage signal 163.

The operation of the above-constructed image decoding apparatusaccording to the 21st embodiment is described. The image decodingapparatus according to the 21st embodiment receives the shape encodedsignal 113, the encoded transparency signal 117, the encoded pixel valuesignal 119 and the encoded mode signal 123, to be output into the shapedecoder 156, the transparency decoder 158, the pixel value decoder 160and the mode decoder 150, respectively.

The mode decoder 150 decodes the encoded mode signal 123, and outputsthe shape encoding mode 151, the transparency encoding mode 153, and thepixel value encoding mode 155 into the shape decoder 156, thetransparency decoder 158 and the pixel value decoder 160, respectively.The shape decoder 156, the transparency decoder 158 and the pixel valuedecoder 160 decode the input encoded signals according to the inputencoding mode respectively, and output the decoded shape signal 157, thedecoded transparency signal 159 and the decoded pixel value signal 161into the reverse blocking unit 162. The reverse blocking unit 162integrates the input decoded signals and outputs the decoded imagesignal 163.

As described above, the image decoding apparatus according to the 21stembodiment has the mode decoder 150, the shape decoder 156, thetransparency decoder 158, the pixel value decoder 160 and the reverseblocking unit 162, and thereby appropriately decodes the encoded signalobtained by the image encoding apparatus according to the 18thembodiment, and performs the integration, and can obtain the decodedimage signal 163.

Note that, in the image decoding apparatus according to the 21stembodiment, although the encoded signal obtained by the image encodingapparatus according to the 18th embodiment, the encoded signals obtainedby the image encoding apparatuses according to the 19th and 20thembodiments can be also appropriately decoded.

Embodiment 22

An image encoding apparatus according to a 22nd embodiment of thisinvention performs encoding of an input signal, switching theintra-/inter-frame encodings adaptable to the input signal.

FIG. 26 is a block structure showing the structure of the image encodingapparatus according to the 22nd embodiment. In the figure, 178 indicatesan intra-/inter-frame encoding judgment unit of the pixel encoding whichjudges the intra- or inter- for the encoding mode of the pixel valuesignal, and outputs the encoding mode 119 of the pixel value signal. 138indicates the shape encoding mode judgment unit which corresponds to theshape encoding mode judgment unit in the 20th embodiment indicated by138 in FIG. 24. 170 and 176 indicate the switches which are switchedaccording to the output of the judgment unit 178 and decide the encodingmode of the shape signal. 172 indicates the intra-/inter-frame encodingjudgment unit which judges the intra- or inter- for the encoding mode ofthe shape signal, and outputs the encoding mode 173 of the shape signal.The other numerals are similar to those in FIG. 22, and the descriptionis similar to that of the 18th embodiment.

A description is given of the above-constructed image encoding apparatusaccording to the 22nd embodiment. Initially, the input image signal 101is input to the image encoding apparatus according to the 22ndembodiment, and then the blocking unit 102, similarly to the 18thembodiment, performs the blocking and the signal separation, and outputsthe pixel value signal and the shape signal.

When the separated pixel value signal 107 is input to theintra-/inter-frame encoding judgment unit of the pixel value encoding,the judgment unit 178 judges whether the encoding is performed by theintra-frame encoding or inter-frame encoding, and outputs the result ofthe judgment as the pixel value encoding mode indicating “intra” or“inter” to the pixel value encoder 120, the mode encoder 122 and theshape encoding mode judgment 138.

In the shape encoding mode judgment unit 138, the switch 170 and 176 areswitched according to the pixel value encoding mode 119. The switchingis performed in such a manner that the judgment unit 172 does notreceive the input when the pixel value encoding mode indicates “intra”,while the judgment unit 172 receives the input when the pixel valueencoding mode indicates “inter”. Accordingly, when the pixel valueencoding mode 119 indicates the intra-frame encoding, the shape judgmentmode 111 indicating the intra-frame encoding is output from the judgmentunit 138.

On the other hand, when the pixel value encoding mode 119 indicates theinter-frame encoding, the intra-/inter-frame encoding judgment unit 172judges whether the encoding of the particular shape signal is performedby the intra-frame encoding or the inter-frame encoding for the shapesignal 105, and outputs the result of the judgment as the shape encodingmode 111.

In either of the cases, the shape encoding mode 111 is output to theshape encoder 112 and the mode encoder 122. And, the operations of thepixel value encoder 120, the shape encoder 112 and the mode encoder 122are similar to those of the 18th embodiment, all of which outputrespective encoded signals.

As will be apparent from the above-described operation, in the imageencoding apparatus according to the 22nd embodiment, when the pixelvalue signal is intra-frame encoded, the shape signal is alwaysintra-frame encoded. In general, since when the pixel values do not haveagreement, the shapes do not have agreement, either, and therefore whenthe pixel value signal should be intra-frame encoded; that is, the pixelvalue signal has a small temporal correlation, even if the number of theencoding mode for encoding, the shape signal is restricted similarly tothe 22nd embodiment, the encoding efficiency in encoding the shapesignal is scarcely degraded.

Also, there is the case that the pixel values to be synthesized willchange though the shape signal in the synthesis is constant such as likea fixed picture (synthesized picture) and the like, and in this case,even if the inter-frame encoding is selected according to the pixelvalue signal, the inter-frame encoding for the shape signal is notalways appropriate. In the image encoding apparatus according to the22nd embodiment, when the inter-frame encoding is selected for the pixelvalue signal, which of the intra-/inter-frame encodings to be selectedis judged and thereby it is also possible to select the intra-frameencoding for the shape signal, and therefore it is possible to preventthe encoding efficiency from seriously degrading due to theinappropriate inter-frame encoding for encoding the shape signal.

Also, when at least either the shape signal or the pixel value signal isinter-frame encoded, a lot of additional information is required for themotion compensation and so on to be carried out in the inter-frameencoding. In the image encoding apparatus according to the 22ndembodiment, there is no case that only the shape signal is inter-frameencoded, so that when the intra-frame encoding is selected for the pixelvalue signal, the bit number can be saved. Generally, theabove-mentioned additional information has the smaller bit number thanwhen the pixel value signal is intra-frame encoded, but if compared tothe bit number required for intra-frame encoding the shape signal, thebit number is of an amount that can not be ignored and this has a bigeffect.

As described above, the image encoding apparatus according to the 22ndembodiment has the intra-/inter-frame encoding judgment unit 178 for thepixel value signal and the shape encoding mode judgment unit 138containing the intra-/inter-frame encoding judgment unit 172 for theshape signal, and thereby the intraframe encodes the encoding mode ofthe shape signal when the encoding mode of the pixel value signal is theintra-frame encoding, while judges and selects the encoding mode for theshape signal when the encoding mode of the pixel value signal is theinterframe encoding, which causes the correlation between the encodingmode 119 for the pixel value signal and the encoding mode 111 for theshape signal to be higher and thereby realizes the reduction of the bitnumber of the encoded mode signal, and makes it possible that the bitnumber of the additional information for the motion compensation isreduced as a result of the prevention of the choice for carrying outinter-frame encoding.

Embodiment 23

An image encoding apparatus according to a 23rd embodiment of thisinvention performs the encoding of the input signal, switching thenumber of the motion vectors in encoding adapting to the input signal.

FIG. 27 is a block structure showing the structure of the image encodingapparatus according to the 23rd embodiment. In the figure, 188 indicatesthe motion vector number judgment unit for encoding the pixel value,which judges what number of motion vectors should be and outputs theencoding mode 119 for the pixel value signal. 138 indicates the shapeencoding mode judgment unit which corresponds to the shape encoding modejudgment unit according to the 20th embodiment indicated by 138 in FIG.24. 180 and 186 are switches which switch according to the output of thejudgment unit 188 and determine the encoding mode for the shape signal.182 indicates the motion vector number judgment unit for encoding theshape, which judges what number of motion vectors should be and outputsthe encoding mode 183 for the shape signal according to the result ofthe judgment. The other encodings are similar to those in FIG. 22, andthe description is similar to that for the 18th embodiment.

The description is given of the image encoding apparatus according tothe 23rd embodiment as constructed above. Initially, the image encodingapparatus according to the 23rd embodiment receives the input imagesignal 101, and the blocking unit 102, similar to the 18th embodiment,performs the blocking and separation of the signal and outputs the pixelvalue signal and the shape signal.

The motion vector number judgment unit 188 for encoding the pixel valuereceives the separated pixel value signal 107, and then judges thesignal to be encoded for what number of the motion vectors for the pixelvalue signal 107 is, and then outputs the result of the judgement as thepixel value encoding mode 119 to the pixel value encoder 120, the modeencoder 122 and the shape encoding mode judgment 138.

FIG. 28 is a drawing for explaining the number of the motion vectors.Since the motion is complicated in the vicinity of the contour of anobject, it is very difficult to sufficiently reduce the motioncompensation error by employing one motion vector (MV) per block. Inthis case, it is known that it is desirable to divide the block, andthen give the divided blocks to the motion vectors, and this changing ofthe number of the motion vectors adaptively according to the nature ofthe image improves the encoding efficiency. Accordingly, the imageencoding apparatus according to the 23rd embodiment adaptively switchesthe motion compensation with the use of one motion vector (MV1) perblock as shown in the figure and the motion compensation with the use ofa total of 4 pieces of motion vectors (MV1,MV2,MV3,MV4) which are givenrespectively to one of the divided blocks which the particular block isdivided into. Therefore, the judgment unit 188 judge whether the numberof the motion vectors is 1 piece or 4 pieces, and outputs “1” or “4” asthe encoding mode for encoding the pixel value.

In the shape encoding mode unit 138, the switches 180 and 186 areswitched according to the pixel value encoding mode. The switching isperformed so that the judgment unit 182 can't receive the input when thepixel value encoding mode indicates “1”, while the judgment unit 182 canreceive the input when the pixel value encoding mode indicates “4”.Accordingly, when the pixel value encoding mode 119 is “1”, the minimumnumber “1” of the motion vectors as the shape judgment mode 111 isoutput.

On the other hand, when the pixel value encoding mode 119 indicates “4”,the motion vector number judgment unit 182 judges whether the number ofthe motion vectors should be 1 piece or 4 pieces for the shape signal105, and outputs the result of the judgment as the shape encoding mode111.

In either of the cases, the shape encoding mode 111 is output to theshape encoder 112 and the mode encoder 122. And, the operations of thepixel value encoder 120, the shape encoder 112 and the mode encoder 122are similar to those of the 18th embodiment, and the respective encodedsignals are output.

As a result of the above-described operation, in the image encodingapparatus according to the 23rd embodiment, when the pixel value signalis encoded using the minimum number of the motion vectors, the shapesignal is always encoded using the minimum number of the motion vectors.As the number of the motion vectors is increased, the informationrequired for encoding the motion vectors adversely becomes larger. Inthis case, by the reduction of the number of the motion vectors forencoding the shape signal, an increase of the load is prevented.

As described above, the image encoding apparatus according to the 23rdembodiment has the motion vector number judgment unit 188 for encodingthe pixel value and shape encoding mode judgment unit 138 containing themotion vector number judgment unit 182 for encoding the shape. Therebywhen the encoding mode for the pixel value signal uses the minimumnumber of motion vectors the encoding mode for the shape signal uses theminimum number. And when the encoding mode for the pixel value signaluses a lot of motion vectors the encoding mode for the shape signal isjudged and then selected. This causes the correlation between theencoding mode 119 for the pixel value signal and the encoding mode 111for the shape signal and makes it possible that the bit number of theencoded mode signal is reduced, and which causes the prevention of theselection when the number of the motion vectors is increased and therebymakes it possible that the bit number is prevented from increasing dueto the increase in the additional information.

Embodiment 24

An image encoding apparatus according to a 24th embodiment of thisinvention performs encoding of the input signal, switching the changingand non-changing of the quantizing step adapting to the input signal.

FIG. 27 is a block structure showing the structure of the image encodingapparatus according to the 24th embodiment. In the figure, 198 indicatesthe quantizing step change/non-change judgment unit for encoding thepixel value which judges whether the quantizing step is performed or notfor the encoding mode for the pixel value signal, and outputs theencoding mode 119 for the pixel value signal. 138 indicates the shapeencoding mode judgment unit which corresponds to the shape encoding modejudgment unit according to the 20th embodiment indicated by 138 in FIG.24. 190 and 196 indicate the switches which are switched according tothe output of the judgment 198 and determine the encoding mode for theshape signal. 192 indicates the quantizing step change/non-changejudgment unit for encoding the shape which judges whether or not thequantizing step is performed for the encoding mode for the shape signal,and outputs the encoding mode 113 for the shape signal depending on theresult of the judgment. The other encodings are similar to those in FIG.22, and the description is similar to that for the 18th embodiment.

The description is given of the image encoding apparatus according tothe 24th embodiment as constructed above. Initially, the image encodingapparatus according to the 24th embodiment receives the input imagesignal 101, and the blocking unit 102, similar to the 18th embodiment,performs the blocking and separation of the signal and outputs the pixelvalue signal and the shape signal.

The quantizing step change/non-change judgment unit 198 receives theseparated pixel value signal 107, and then judges whether or not thequantizing step is performed for the pixel value signal 107, and thenoutputs the result of the judgment as the pixel value encoding mode 119to the pixel value encoder 120, the mode encoder 122 and the shapeencoding mode judgment 138.

In the shape encoding mode unit 138, the switches 190 and 196 areswitched according to the pixel value encoding mode. The switching isperformed so that the judgment unit 192 can't receive the input when thepixel value encoding mode indicates “non-change”, while the judgmentunit 192 can receive the input when the pixel value encoding modeindicates “change”. Accordingly, when the pixel value encoding mode 119indicates that the quantizing step is not changed, the shape judgmentmode 111 indicating “non-change” is output.

On the other hand, when the pixel value encoding mode 119 indicates thatthe quantizing step is changed, the judgment unit 192 judges whether ornot the quantizing step is performed for the shape signal 105, andoutputs the result of the judgment as the shape encoding mode 111.

In either of the cases, the shape encoding mode 111 is output to theshape encoder 112 and the mode encoder 122. And, the operations of thepixel value encoder 120, the shape encoder 112 and the mode encoder 122are similar to those of the 18th embodiment, and the respective encodedsignals are output.

Since the value of the quantizing step is directly related to thecompression rate, namely the transmission rate of encoded signals,generally, in order that the transmission rate or recording rate of theencoded signal into which the image is encoded should be constant, thequantizing step is coarsely controlled if the transmission rate is equalto or larger than the given value, while the quantizing step is finelycontrolled if the transmission rate is less than the given value. And,since the value of the quantizing step also directly influences thepicture quality of the encoded signal, when the image is one in whichthere exist step-like changes of the pixel values, as the degradation ofthe picture quality in the amplitude direction is difficult to bevisually detected, it is possible to make the compression rate higher bymaking the quantizing step larger. In this case, the changing of thequantizing step is usually performed according to the change of thepixel value.

When control of the changing of the quantizing step as described aboveis performed, the information indicating “the quantizing step has beenchanged” is added to each block and encoded along with the image data.However, it is often that the change of the quantizing step should beperformed in such a manner that the pixel value signal and the shapesignal are simultaneously changed, so that when the quantizing step forthe pixel value signal is not changed, even if the change of thequantizing step for the shape signal is prevented, the degradation ofthe picture quality caused by the restriction is small, meanwhile theadditional information indicating the change of the quantizing step isreduced to a large extent.

As described above, the image encoding apparatus according to the 24thembodiment has the quantizing step change/non-change judgment unit 198for encoding the pixel value, and the shape encoding mode judgment unit138 containing the quantizing step change/non-change judgment unit 192for encoding the shape, and thereby when the encoding mode for the pixelvalue signal is “quantizing step non-change”, the encoding mode for theshape signal is “quantizing step non-change”, while when the encodingmode for the pixel value signal is “quantizing step change”, theencoding mode for the shape signal is judged and selected, which causesthe correlation between the encoding mode 119 for the pixel value signaland the encoding mode 111 for the shape signal, and makes it possiblefor the bit number of the encoded mode signal to be reduced, and whichcauses the prevention of the selection of the changing the quantizingstep and thereby makes it possible that the increase in the additionalinformation due to the change of the quantizing step is prevented andthe bit number is reduced.

Note that, although the structures of the image encoding apparatusesaccording to the 22nd to 24th embodiments are based on the 20thembodiment shown in FIG. 24, it is also possible for them to be based onthe 19th embodiment shown in FIG. 23, and also, the correlation of theencoding modes becomes higher and the additional information isprevented from increasing, which realizes the reduction of the bitnumber. Also, it is possible to base it on the 18th embodiment shown inFIG. 20, and the bit number is reduced, realizing the encodings suitablefor the respective signals.

Also, the encoded signals obtained by the image encoding apparatusesaccording to the 22nd to 24th embodiments can be appropriately decodedby the image decoding apparatus according to the 21st embodiment.

Also, although in the 18th to 21st embodiments the input image signalconsists of the transparency information and the shape information inaddition to the pixel value information and is separated into the pixelvalue signal, the transparency signal and the shape signal, in the 22ndto 24th embodiments the input image signal is separated into the pixelvalue signal and the shape signal. Concerning this, when also in the22nd to 24th embodiments the transparency information and the shapeinformation have agreement, it is possible to use only the shapeinformation, while when there is not agreement, if the transparencyinformation is made the shape signal, or the transparency informationwhich is a multi-valued signal is processed along with the pixel valueinformation in the blocking unit, the shape signal and the pixel valuesignals are obtained.

Embodiment 25

An image encoding apparatus according to a 25th embodiment of thisinvention receives a two-dimensional image signal as an input signal andperforms the prediction and detection of change pixels.

FIG. 30 is a block structure showing the structure of the image encodingapparatus according to the 25th embodiment. In the figure, 201 indicatesthe input signal which is input to the image encoding apparatus as atwo-valued image signal. 204 c indicates the 1st change pixel detectorwhich detects the pixel changing the pixel value for the input signal201 and outputs the result as the detected 1st change pixel 205 c. 202 aand 202 b are the memories which temporarily store the input signals andoutput the signals as the reference signals 203 a and 203 b with adelay. 204 a and 204 b indicate the change pixel detectors which detectthe pixels changing the pixel values for the reference signals 203 a and203 b and output the results as the detected 2nd change signal 203 a andthe detected 3rd change pixel 203 b. 206 indicates the change pixelpredictor which predicts the change pixel which will be output by the1st change pixel detector 204 c based on the detected change pixels 203a and 203 b, and outputs the predicted change pixel 207. 208 indicatesthe subtractor which obtains the difference between the 1st change pixel205 c and the predicted change pixel 207 and thereby outputs thedifference as the prediction error 209. 210 indicates the encoder whichencodes the prediction error 209 and outputs the encoded signal 211.

The operation of the image encoding apparatus according to the 25thembodiment as constructed above is explained.

FIG. 31 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 25thembodiment. Here for the simplicity of the description, such a procedureis described of the process performed pixel by pixel. In FIG. 31, thescanning is carried out from the top left moving to the right, while theencoding proceeds to the bottom right direction. The pixel value of eachpixel has two values which represent true and false values (two values)by the presence of the slant lines. In addition, here, the encoding hasbeen accomplished on the 1st line and the 2nd line, and the 3rd line (onwhich the 1st change pixel exists) is to be encoded.

The change pixel, in the above-described scanning, means a first pixelthat changes the pixel value, and the change pixels on the alreadyscanned lines (scanning lines) designate the 2nd change pixel and the3rd change pixel, and the 1st change pixel on the scanning line notencoded yet designates the lst change pixel. Accordingly, the 1st changepixel is predicted from the 2nd and 3rd change pixels, and if thedifference value (prediction error) between the predicted 1st changepixel and the real 1st change pixel is calculated, the prediction erroris distributed concentrating in the neighborhood of 0, and thereby theefficient encoding with the small bit number using the variable-lengthencoding and the like is possible.

In FIG. 30, the input signal 201 is first input to the apparatus. As theinput signal 201, the ordinary color signal (pixel value signal), or theshape signal representing the shape of an object or the synthesis rateof an object can be used. The input signal 201 is input and temporarilystored in the memories 202 a and 202 b. On the other hand, the inputsignal 201 is also input to the 1st change pixel detector 204 c, and thechange pixel detector 204 c detects the pixel changing the two-valuedpixel value. This is the 1st change pixel in FIG. 31. In FIG. 30, the1st change pixel 205 c is input to the subtractor 208.

On the other hand, the memory 202 a outputs the temporarily stored inputsignal 201 as the reference signal 203 a to the change pixel detector204 a with a 2 line delay, and the change pixel detector 204 a detectsthe 2nd change pixel 205 a in FIG. 31. Similarly, the memory 202 boutputs the temporarily stored input signal 201 as the reference signal203 b to the change pixel detector 204 b with a 1 line delay, and thechange pixel detector 204 b detects the 3rd change pixel in FIG. 31. InFIG. 30, the change pixels 205 a and 205 b are input to the change pixelpredictor 207.

An image generally has correlation in the horizontal and verticaldirections, and the 1st to 2nd change pixels are often positioned on analmost straight line. The change pixel predictor 206, based on this,performs prediction of the input change pixel, and outputs the obtainedpredicted change pixel 207 to the subtractor 208. The subtractor 208obtains the difference between the input 1st change pixel 205 c and thepredicted change pixel 207, and thereby outputs the difference as theprediction error 209 to the encoder 210, and the encoder 210 encodes theprediction error 209 and outputs the encoded signal 211. The predictionerror which is the difference in value of the predicted change pixel andthe detected 1st change pixel is distributed concentrating in theneighborhood of 0, and therefore if this is encoded, using thevariable-length encoding which gives a small bit number to the near 0value, the efficient encoding can be performed with the small bitnumber.

As described above, the image encoding apparatus according to the 25thembodiment has the memories 202 a to 202 b, the change pixel detectors204 a to 204 c, the change pixel predictor 207, the subtractor 208 andthe encoder 210, and thereby, based on the change pixel detected fromthe reference signal which is the delayed input signal, predicts thechange pixel of the particular input signal, and encodes the error ofthe prediction, which makes it possible to improve the encodingefficiency.

Embodiment 26

An image encoding apparatus according to a 26th embodiment of thisinvention receives a two-dimensional image signal consisting of aplurality of pixels as an input signal, and predicts and detects changepixels, and differs from the 25th embodiment in the method of obtainingchange pixels for the use of prediction.

FIG. 32 is a block diagram showing the structure of the image encodingapparatus according to the 26th embodiment. In the figure, 201 indicatesthe input signal which is input to the image encoding apparatus as atwo-valued image signal. 204 indicates the change pixel detector whichdetects the pixel changing the pixel value for the input signal 201 andoutputs the result as the detected change pixel 205. 216 a and 216 b arememories which delay the input signal by the temporary store. 216 adelays the detected change pixel 205 and outputs the reference signals217 a, and 216 b delays the reference signal 217 a and outputs thereference signals 217 b. 206 indicates the change pixel predictor whichpredicts change pixels based on the reference change pixels 217 a and217 b, and outputs the predicted change pixel 207. The subtractor 208and the encoder 210 are the same as those of the 25th embodiment.

The operation of the image encoding apparatus according to the 26thembodiment as constructed above is explained. The input signal 201,similar to the 25th embodiment, is input to the image encoding apparatusaccording to the 26th embodiment, and the pixel changing the two-valuedpixel value is detected by the change pixel detector 204, and thedetected change pixel 205 is output to the memory 216 a and thesubtractor 208. The detected change pixel 205 input to the memory 216 ais delayed by one line and then output as the reference change pixel 217a to the change pixel predictor 206 and the memory 216 b. The referencechange pixel 217 a input to the memory 216 b is further delayed by oneline, and then output as the reference change pixel 217 b to the changepixel predictor 206. By handling the reference change pixels 217 a and217 b as the 2nd and 3rd change pixel in the 25th embodiment, it ispossible for the change pixel predictor 206 to perform the predictionsimilar to that of the 25th embodiment, and thereby the predicted changepixel 207 is obtained. The remaining processes are similar to those ofthe 25th embodiment.

As described above, the image encoding apparatus according to the 26thembodiment has the memories 216 a to 216 b, the change pixel detector204, the change pixel predictor 207, the subtractor 208 and the encoder210, and thereby obtains the reference change pixel by delaying thechange pixel detected from the input signal in the memory, and based onthe reference change pixel, predicts the change pixel in the particularinput signal, and encodes the error of the prediction, which makes itpossible to improve the encoding efficiency.

Embodiment 27

An image encoding apparatus according to a 27th embodiment of thisinvention receives a two-dimensional image signal consisting of aplurality of pixels as an input signal, and predicts and detects changepixels, and differs from the 25th embodiment in the method of obtainingchange pixels with the use of prediction.

The image encoding apparatus according to the 27th embodiment has astructure similar to that of the 25th embodiment, and thereby isdescribed in FIG. 30. In the image encoding apparatus according to the25th embodiment, as described using FIG. 31, for the scanning line to beencoded, the change pixels on the scanning lines of the previous andprevious 2 lines are used for the prediction. In the image encodingapparatus according to the 27th embodiment, the prediction is performedbased on the change pixel on the scanning line several lines before.

FIG. 33 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 27thembodiment. For the scanning line positioned at the bottom to beencoded, based on the 2nd and 3rd change pixels detected on the scanninglines 7 lines before and 4 lines before, if it is predicted that thefirst change pixel should exist on the straight line, the predictedpixel shown in the figure is obtained. Using the prediction errorbetween the predicted change pixel and the first change pixel detectedon the particular scanning line from the input signal, the information“one pixel right from the predicted change pixel” is encoded, andthereby the improvement of the encoding efficiency is realized similarto the 25th embodiment.

The operation of the image encoding apparatus according to the 27thembodiment is similar to that of the image encoding apparatus accordingto the 25th embodiment, except that the delay times caused by thetemporary store in the memories 202 a and 202 b are different from thoseof the 25th embodiment. Also, concerning the prediction of the changepixel predictor 206, the change pixel can be predicted by the followingcalculation. The 2nd change pixel is regarded as the x-th pixel on them-th line, and the 3rd change pixel is regarded as the y-th pixel on then-th scanning line, and the predicted point of the 1st change pixel isregarded as the z-th pixel on the k-th line, and if it is assumed thatthe 3 points are positioned on a straight line, the followingrelationship is established, x−y:=z−y=m−n:k−n, resulting inz−y=(x−y)*(n−k)/(m−n). Accordingly, z=y−(x−y)*(n−k)/(m−n), and therebythe 1st change pixel is positioned at the y−(x−y)*(n−k)/(m−n)-th pixelon the k-th line.

As described above, in the image encoding apparatus according to the27th embodiment, by the same structure of the image encoding apparatusaccording to the 25th embodiment, there is provision for the delay timeswith the use of the memories 202 a and 202 b to be changed, obtaining asimilar result.

Embodiment 28

An image encoding apparatus according to a 28th embodiment of thisinvention receives a two-dimensional image signal consisting of aplurality of pixels as an input signal, and predicts and detects changepixels, and differs from the 25th embodiment in the method of obtainingchange pixels for the use of prediction.

The image encoding apparatus according to the 28th embodiment has thestructure similar to that of the 25th embodiment shown in FIG. 30, andhas the decoder which decodes the encoded signal 211, and outputs thealready encoded and decoded signal which is output by this decoder toeither of the memories. In the image encoding apparatus according to the25th embodiment, as described using FIG. 31, for the scanning line to beencoded, change pixels on scanning lines which are positioned at 1 lineabove and 2 lines above are used for the prediction, but in the imageencoding apparatus according to the 28th embodiment, change pixels onthe already encoded and decoded scanning line being positioned below areused for the prediction.

FIG. 34 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 28thembodiment. For the scanning line to be encoded (in the figure, the lineon which the 1st change pixel exists), based on the 2nd and 3rd changepixels detected on scanning lines 4 lines above and 3 lines below, if itis predicted that the 1st change pixel should be on a straight line, thepredicted change pixel shown in the figure is obtained. By encoding theinformation “2 pixels right from the predicted change pixel” using theprediction error between this predicted change pixel and the 1st changepixel detected on the particular scanning line from the input signal, animprovement of the encoding efficiency is realized similar to the 25thand 27th embodiments.

The image encoding apparatus according to the 28th embodiment differsfrom that according to the 25th embodiment only both in a delay timecaused by the temporary store in both of the memories 202 a and 202 b,and in that the encoded signal 211 output by the encoder 210 is encodedand the result is input to either of the memories, and the correspondingchange pixel detector detects change pixels from this encoded anddecoded signal.

As described above, the image encoding apparatus according to the 28thembodiment obtains a similar result, because of the structure which isof the image encoding apparatus according to the 25th embodiment whichis added to the channel in which the encoded signal is decoded and ismade the reference image.

Embodiment 29

An image encoding apparatus according to a 29th embodiment of thisinvention receives a two-dimensional image signal consisting of aplurality of pixels as an input signal, and predicts and detects changepixels, and similarly to the 26th embodiment, delays the detected changepixel to be used for the prediction.

FIG. 35 is a block diagram showing the structure of the image encodingapparatus according to the 29th embodiment. In the figure, 216 and 220indicate memories which temporarily store the input change pixels inorder to delay the pixels. The memory 216 delays the detected changepixel 205 and outputs the delayed change pixel 217, and the memory 220delays the prediction error 209 and outputs the delayed prediction error221. 222 and 224 indicate adders, and the adder 222 adds the delayedchange pixel 217 and the delayed prediction error 221, and the adder 224adds the prediction error 209 and the delayed prediction error 221. Theother numerals are the same as those in FIG. 32, the description issimilar to that for the 26th embodiment.

The operation of the image encoding apparatus according to the 29thembodiment as constructed above is explained. FIG. 36 is a drawing forexplaining the operating principle of the encoding performed by theimage encoding apparatus according to the 29th embodiment. In the imageencoding apparatus according to the 26th embodiment, by delaying thedetected 1st change pixel, the 2nd and 3rd change pixels are obtained.As opposed to this, in the image encoding apparatus according to the29th embodiment, the difference between the 2nd change pixel and the 3rdchange pixel is added to the 3rd change pixel, and the result is used asthe predicted value of the 1st change pixel. As shown in the figure, thedifference between the 2nd change pixel and the 3rd change pixel is “to2 pixels left”, and this “to 2 pixels left” is added to the 3rd changepixel, and thereby on the scanning line on which the encoding isperformed (in the figure, the line on which the 1st change pixelexists), the predicted change pixel of the same figure is obtained. Onthe other hand, on the scanning line to be currently encoded, the 1stchange pixel is detected, and the difference between this detected 1stchange pixel and above-mentioned predicted change pixel, “to 1 pixelleft”, is encoded, resulting in realizing the same effect as the 26thembodiment.

In FIG. 35, the input signal 201 is input to the image encodingapparatus according to the 29th embodiment, the position where thetwo-valued pixel value changes is detected by the change pixel detector204, and the 1st change pixel 205 is output to the memory 216 and thesubtractor 208. In the memory 216, the delayed change pixel 217 delayedby 1 line is the 3rd change pixel in FIG. 36. The delayed change pixel217 is input to the adder 222, and is added to the delayed predictionerror 221 corresponding to the difference between the 2nd and 3rd changepixels in FIG. 36, and the obtained predicted change pixel 207 is outputto the subtractor 208.

The subtractor 208 outputs the difference between the detected changepixel 204 and the predicted change pixel 207 as the prediction error209, and the prediction error 209 is encoded in the encoder 210, and theencoded signal 211 is output.

The prediction error 209 is also added, in the adder 224, with thedelayed prediction error 221. The delayed prediction error 221 obtainedas a result of this corresponds to the difference between the 2nd and3rd change pixels, and is delayed by being temporarily stored in thememory 220 and will be used in the next encoding. That is, in FIG. 36,on the next line (one line below), the above-mentioned “to 2 pixelsleft” which is the delayed error 221 and the above-mentioned “to 1 pixelleft” which is the prediction error 209 are added to become “to 3 pixelsleft” which is used as the predicted value.

As described above, the image encoding apparatus according to the 29thembodiment has the memories 216 and 220, the change pixel detector 204,the adders 216 and 220, the subtractor 208, and the encoder 210, andthereby carries out the delaying and addition processes for the changepixel detected from the input signal and the prediction error, resultingan improvement of the encoding efficiency similar to the 26thembodiment.

Note that any of the image encoding apparatuses according to the 25th to29th embodiments can receive the input block by block and process theinput for the respective blocks.

Embodiment 30

An image decoding apparatus according to a 30th embodiment of thisinvention decodes the encoded signal output by the encoding apparatusaccording to the 25th embodiment to obtain a two-dimensional imagesignal consisting of a plurality of pixels.

FIG. 37 is a block diagram showing the structure of the image decodingapparatus according to the 30th embodiment. In the figure, 211 indicatesthe input signal which is the encoded signal (211 in FIG. 30) of theprediction error output by the image encoding apparatus according to the25th embodiment. 230 indicates the decoder which decodes the encodedsignal 211 and outputs the decoded prediction error 231. 232 indicatesthe adder which processes the decoded prediction error 231 and thepredicted change pixel 207 by addition, and outputs the obtained decodedchange pixel 233. 234 indicates the pixel value generator whichgenerates the decoded image signal 235 and outputs the same, assumingthe pixel which is positioned between the decoded change pixel 233 andthe immediately previous decoded change pixel has the given pixel value,namely the pixel value which makes the pixel not a change pixel. Theother numerals are similar to those in FIG. 30, and the description issimilar to that in the 25th embodiment.

The description is given of the operation of the image encodingapparatus according to the 30th embodiment as constructed above. Theencoded signal 211 is input, and then the encoded signal 211 into whichthe prediction error is encoded is decoded in the decoder 230, and thedecoded prediction error 231 obtained as a result of this is output tothe adder 232.

On the other hand, the immediately previous decoded image signal 235 isinput to the memories 202 a and 202 b, and similarly to the 25thembodiment, is subjected to the prediction of the change pixel, and thepredicted change pixel 207 is output from the change pixel predictor 206to the adder 232. The adder 232 adds the input decoded prediction error231 to the predicted change pixel 207, and obtains the decoded changepixel 233 and outputs the same to the pixel value generator 234. Thepixel value generator 234 generates the decoded image signal 235 andoutputs the same, assuming the pixel which is positioned between thedecoded change pixel 233 and the immediately previous decoded changepixel should have the given pixel value, namely the pixel value whichmakes the pixel not a change pixel.

As described above, the image decoding apparatus according to the 30thembodiment has the memories 202 a and 202 b, the change pixel detectors204 a and 204 b, the change pixel predictor 207, the decoder 230, theadder 232, and the pixel value generator 234, and thereby obtains thedecoded change pixel using the predicted change pixel and the decodedprediction error, and based on this, obtains the decoded image signal235, whereby the encoded signal by the 25th embodiment can beappropriately decoded.

Note that, in the 30th embodiment, although the encoded signal encodedby the image encoding apparatus according to the 25th embodiment isdecoded, the encoded signal which is encoded by the image encodingapparatuses according to the 27th and 28th embodiments is also similarlydecoded.

Embodiment 31

An image decoding apparatus according to a 31st embodiment of thisinvention decodes the encoded signal output by the encoding apparatusaccording to the 26th embodiment to obtain a two-dimensional imagesignal consisting of a plurality of pixels.

FIG. 38 is a block diagram showing the structure of the image decodingapparatus according to the 31st embodiment. In the figure, the decoder230, the adder 232 and the pixel value generator 234 are similar tothose in FIG. 37, and the others are similar to those in FIG. 32, andthe description is similar to those for the 30th and 26th embodiments.

The description is given of the operation of the image decodingapparatus according to the 31st embodiment as constructed above. Theinput signal 211 is input, and then this encoded signal 211 into whichthe prediction error is encoded is decoded in the decoder 230, and thedecoded prediction error 231 obtained as a result of this is output tothe adder 232. On the other hand, the immediately previous decoded imagesignal 233 is input to the memory 216 a, and similarly to the 26thembodiment, is subjected to the prediction of the change pixel, and thepredicted change pixel 207 is output from the change pixel predictor 206to the adder 232. The remaining processes are similar to those in the30th embodiment.

As described above, the image decoding apparatus according to the 31stembodiment has the memories 216 a to 216 b, the change pixel predictor207, the decoder 230, the adder 232, and the pixel value generator 234,and thereby obtains the decoded change pixel using the predicted changepixel and decoded prediction error, and based on this, obtains thedecoded image signal 235, whereby the encoded input signal by the 26thembodiment can be appropriately decoded.

Embodiment 32

An image decoding apparatus according to a 32nd embodiment of thisinvention decodes the encoded input signal output by the encodingapparatus according to the 29th embodiment to obtain a two-dimensionalimage signal consisting of a plurality of pixels.

FIG. 39 is a block diagram showing the structure of the image decodingapparatus according to the 32nd embodiment. In the figure, the decoder230, the adder 232 and the pixel value generator 234 are similar tothose in FIG. 37, and the others are similar to those in FIG. 35, andthe description is similar to those for the 30th and 29th embodiments.

The description is given of the operation of the image decodingapparatus according to the 32nd embodiment as constructed above. Theinput signal 211 is input, and then this encoded input signal 211 intowhich the prediction error is encoded is decoded in the decoder 230, andthe decoded prediction error 231 obtained as a result of this is outputto the adder 232. On the other hand, the immediately previous decodedimage signal 233 is input to the memory 216, and similar to the 29thembodiment, is subjected to the prediction of the change pixel, and thepredicted change pixel 207 is output from the adder 222 to the adder232. The remaining processes are similar to those in the 30thembodiment.

As described above, the image decoding apparatus according to the 31stembodiment has the memories 216 and 220, the adders 224, 222 and 232,the decoder 230, and the pixel value generator 234, and thereby obtainsthe decoded change pixel using the predicted change pixel and thedecoded prediction error, and based on this, obtains the decoded imagesignal 235, whereby the encoded input signal by the 29th embodiment canbe appropriately decoded.

Note that, when the encoding has been performed block by block in any ofthe image encoding apparatuses according to the 25th to 29thembodiments, in the image encoding apparatuses according to the 30th to32nd embodiments, by receiving and processing the encoded signal blockby block, the appropriate processing can be performed.

Embodiment 33

An image encoding apparatus according to a 33rd embodiment of thisinvention switches the prediction error and the result of encoding thepixel number and outputs the same.

FIG. 40 is a block diagram showing the structure of the image encodingapparatus according to the 33rd embodiment. In the figure, 240 indicatesthe subtractor which obtains the difference 241 between the detectedchange pixels 205 b and 205 c. 242 indicates the encoder which encodesthe difference 41 and outputs the encoded signal 243. 244 indicates thecomparator which compares the prediction error 209 and the given value,and according to the result, controls the switching of the switch 246.246 indicates the switch which switches the encoded signals 247 and 243,either of which is to be the output encoded signal 211 of the imageencoding apparatus, according to the 33rd embodiment by the control ofthe comparator 244. The other numerals indicate the same as those inFIG. 30, and the description is the same as that in the 25th embodiment.The image encoding apparatus according to the 25th embodiment performsthe encoding of the prediction error, but it performs the encoding onthe assumption that the prediction error is small, so that when theprediction error is large, the encoding efficiency is reduced. In thiscase, the encoding efficiency is better when the change pixel itself(position) is encoded than when the prediction error is encoded.Accordingly, the image encoding apparatus according to the 33rdembodiment can perform encoding of the prediction error and encoding thepixel number indicating the position of the change pixel. Also, byencoding the change pixel itself (position), even when the number of thechange pixels is changed, and the prediction becomes difficult orimpossible, and the encoding of the prediction error becomes difficultor impossible, the encoding can be still performed.

The operation of the image encoding apparatus according to the 33rdembodiment as constructed above is explained.

FIG. 41 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 33rdembodiment. The prediction of the lst change pixel from the 2nd and 3rdchange pixels is similar to the case of the 25th embodiment. In the 33rdembodiment, the prediction range centering on the predicted change pixelis set up according to the previously given value. Thereafter, accordingto whether or not the detected 1st change pixel is within the predictionrange, the switching of the encoding is carried out, and thereby theprediction error is encoded when it is within the prediction range,while the 1st change pixel is encoded when it is not within theprediction range.

Also, in the 33rd embodiment, since the 3rd change pixel is the alreadyencoded and decoded one, in order to encode the 1st change pixel, thedifference between the orders of the scanning of the 3rd change pixeland the 1st change pixel, namely the number of the pixels existingtherebetween, should be encoded. Further, since a pixel among the pixelstherebetween which is positioned within the above-mentioned predictionrange is encoded by the prediction error, it is possible to remove thepixel. Accordingly, in order to encode the 1st change pixel, theabove-mentioned difference of the change pixels except the pixels withinthe prediction range should be encoded.

For example, the procedure will be described in the case that the changepixel A and the change pixel B in the same figure are outside of theprediction range and these points are detected as the 1st change pixel.Similar to the description for the 25th embodiment, supposing that thescanning direction is top left→bottom right, the 1st change pixel is3*12+6=42th, and the change pixel A is 4*12+1=49th, and the change pixelB is 4*12*10=58th. As there is no prediction range between the 3rdchange pixel and the change pixel A, the number 49−42=7 of the pixelsbetween the two as the change pixel A, namely the information indicatingthe position of A, is encoded. As opposed to this, in the case of thechange pixel B, as the prediction range is included between the 3rdchange pixel and the change pixel B, the 5 pixels existing within thisprediction range are removed, and 58−42−5=11 as the change pixel B,namely the information indicating the position of B, is encoded.

After the input signal 201 is input to the image encoding apparatusaccording to the 33rd embodiment and from the delay performed by thememories 202 a and 202 b for obtaining the prediction error 209performed by the subtractor 208, the process is carried out similar tothe 25th embodiment, and the encoded signal 247 of the prediction erroris obtained by the encoder 210. Although this encoded signal is theoutput encoded signal in the 25th embodiment, in the 33rd embodiment,the encoded signal 247 is output to the switch 246. Also, the predictionerror 209 is output to the encoder and the comparator 244.

On the other hand, the 3rd change pixel 205 b detected by the changepixel detector 204 b and the 1st change pixel 105 c detected by thechange pixel detector 204 c are output to the subtractor 240, and thenumber 241 of the pixels existing between the two is obtained and outputto the encoder 242 as the difference. The encoder 242 obtains the pixelnumber encoded signal except for the pixels existing within theprediction range, from the input difference 241 and the prediction error243, and outputs the obtained signal to the switch 246.

The comparator 244 judges whether the input prediction error is withinthe prediction range or not, and when it is within the prediction range,outputs the prediction error encoded signal 247 as the output 211 in theswitch 246, when it is not within the prediction range, outputs thepixel number encoded signal 243 as the output 211 in the switch 246,which is controlled according to the signal 245.

As described above, based on the image encoding apparatus according tothe 25th embodiment, the structure of the image encoding apparatusaccording to the 33rd embodiment is made up of the subtractor 240, theencoder 242 for the pixel number, the comparator 244 and the switch 246,and thereby when the prediction error is within the given range, theencoded signal of the prediction error is the output encoded signal,while when the prediction error is outside of the range, the pixelnumber encoded signal is the output encoded signal, so that when theprediction error is large, even if the prediction of the change pixel isimpossible due to the change of the number of the change pixels, thereduction of the encoding efficiency is prevented and the encoding canbe appropriately performed.

Embodiment 34

An image decoding apparatus according to a 34th embodiment of thisinvention decodes the encoded signal output by the encoding apparatusaccording to the 33rd embodiment to obtain a two-dimensional imagesignal consisting of a plurality of pixels.

FIG. 42 is a block diagram showing the structure of the image decodingapparatus according to the 34th embodiment. In the figure, 50 indicatesthe mode decoder which judges whether the input signal is the signalinto which the prediction error is encoded or the signal into which theposition (pixel number) of the change pixel is encoded, and outputs theencoded mode 251. 256 indicates the pixel number decoder which encodesthe input signal 255 and outputs the encoded pixel number 257. 258indicates the adder which processes the predicted change pixel 205 b andencoded pixel number 257 by addition, and outputs the decoded changepixel 259. 252 and 260 indicate the switches which switch the inputsignal and output signal corresponding to the encoding mode output bythe mode encoder 250. The others are similar to those in FIG. 30, andthe description is similar to that for the 25th embodiment.

The description is given of the operation of the image decodingapparatus according to the 34th embodiment as constructed above. Theencoded signal 211 is input, and then initially, the mode encoder 250judges whether the input signal is the signal into which the predictionerror is encoded or the signal into which the pixel number is encoded,and according to the result of the judgment, outputs the encoding mode,“prediction error” or “pixel number”, which controls the switches 252and 260.

The operation where the prediction error has been encoded is similar tothat in the 30th embodiment. On the other hand, when the pixel number isencoded, by switching of the switch 252, the input signal 211 is encodedby the encoder 256, and the pixel number, the difference of the changepixels, is encoded, and the decoded pixel number 257 is output to theadder 258. In the adder 258, the decoded pixel number 257 is added tothe predicted change pixel whose prediction is based on the immediatelyprevious decoded image signal 235, and thereby the decoded change pixel259 is obtained. In any case, based on the decoded change pixel 261, thedecoded image signal 235 is output similar to the 30th embodiment. Asdescribed above, based on the image decoding apparatus according to the30th embodiment, the structure of the image decoding apparatus accordingto the 34th embodiment is made up of the mode decoder 250, the adder258, the decoder 256 for the pixel number, and the switches 252 and 260,and thereby the switches 252 and 260 are switched corresponding to theencoding mode obtained by the mode decoder 250, and the appropriatedecoding is selectively performed, whereby the encoded signal encoded inthe 33rd embodiment can be appropriately decoded.

Embodiment 35

An image encoding apparatus and an image decoding apparatus according toa 35th embodiment can change the prediction range according to imagesignals.

The image encoding apparatus and image decoding apparatus according tothe 35th embodiment have the same structures as those of the 33rd and34th embodiments.

FIG. 43 is a drawing for explaining the operating principle of theencoding or decoding according to the 35th embodiment. In the left sideof the figure, the case is shown where the input image consists of 8×8pixels, and on the right side of the figure there is shown same examplewhich is sub-sampled into 1/2 and is therefore composed of 4×4. Thepixel number of what is sub-sampled is 1/2, while the distances betweenpixels double. Accordingly, in the case of what is sub-sampled, bymaking the prediction range be the range corresponding to 1/2 of theoriginal prediction range, almost the same special positions aresearched. For example, if the range used is ±2 pixels being the same asthat of the original on the left side as the prediction range for whatis sub-sampled on the right side, the range is beyond the pixel numberon a fine, and therefore, the mode switching is not appropriatelyperformed in the 33rd and 34th embodiments. As opposed to this, in thecase of what is sub-sampled on the right side as shown in the figure, ifthe prediction range is 1/2, the mode switching will be appropriatelyperformed, resulting in realizing the improvement of the encodingefficiency performed by the same embodiments.

As described above, the image encoding apparatus and image decodingapparatus according to the 35th embodiment are the image encodingapparatus according to the 33rd embodiment and the image decodingapparatus according to the 34th embodiment wherein the size of theprediction range can be changed according to the size of the imagesignal, whereby the encoding efficiency can be improved by performingthe appropriate switching, even when the sub-sampling is performed.

Embodiment 36

An image encoding apparatus according to a 36th embodiment of thisinvention encodes shape signals representing the shapes of objects, andextracts a significant area from an image signal and performs efficientencoding.

FIG. 44 is a block diagram showing the structure of the image encodingapparatus according to the 36th embodiment. In the figure, 401 indicatesthe two-dimensional shape signal as the input signal. 402 indicates asignificant area extractor which extracts a significant area from theinput shape signal 401 and outputs a significant area signal 403. 404indicates the blocking unit which blocks the input shape signal 401 andoutputs a blocked shape signal 405. 408 indicates the switch whichperforms switching according to the significant area signal 403. 412indicates a block size changer which changes the block size according tothe significant area signal 403 and outputs the changed blocked shapesignal 413. 418 and 414 indicate encoders which encode the significantarea signal 403 and the blocked shape signal 413, and outputs theencoded signals 419 and 415, respectively.

The operation of the image encoding apparatus according to the 36thembodiment as constructed above, is described. The input signal 401, thetwo-dimensional shape signal, is input to the image encoding apparatusaccording to the 36th embodiment, and is then input to the significantarea extractor 402 and the blocking unit 404. The significant areaextractor 402 detects the range of the significant area, and outputs thesignificant area signal 403 to the switch 408, the block size changer412 and the encoder 418.

FIG. 45 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 36thembodiment. The part indicated by slant lines means the interior pixelof the object, namely the pixel in which the significant signal exists,and a minimum rectangle containing the slant-lined part, namely therectangle indicated by the bold line in the figure, corresponds to therange of the significant area. The blocking unit 405 blocks the inputshape signal and outputs the blocked shape signal to the switch 408.Here, the switch 408 will be ON-state when the blocked shape signal 405corresponds to the range of the significant area indicated by thesignificant area signal 403. That is, if it is outside of thesignificant area, the blocked shape signal is not subjected to theencoding process.

When the switch is ON, the blocked shape signal 405 is input to theblock size changer 412, and the size is changed to the minimum blockcontaining the significant area according to the significant area signal403 input to the block size changer 412, and the changed shape signal413 is output to the encoder 414 and is encoded and is regarded as theencoded signal 415 of the shape signal. On the other hand, thesignificant area signal indicating the significant area range is alsoencoded in the encoder 418, and the encoded signal 419 is output.

As described above, the image encoding apparatus according to the 36thembodiment has the significant area detector 102 and the block sizechanger 412, and thereby detects the significant area range, and changesthe block size of the shape signal in order to encode the shape signalonly within the interior range of the significant area, whereby theoutside of the significant area is no longer encoded and the encodeefficiency of the shape signal is improved.

Embodiment 37

An image encoding apparatus according to a 37th embodiment of thisinvention decodes the encoded signal output by the image encodingapparatus according to the 36th embodiment, and obtains atwo-dimensional shape signal.

FIG. 46 is a block diagram showing the structure of the image encodingapparatus according to the 37th embodiment. In the figure, 419 and 415indicate the encoded signal output by the image encoding apparatusaccording to the 36th embodiment. 420 indicates the decoder for thesignificant area signal which decodes the input signal and outputs adecoded significant area signal 421. 422 indicates the encoder for theshape signal which decodes the input signal and outputs a minimumblocked shape encoded signal 423. 430 indicates a block size changerwhich changes the block size according to the decoded significant areasignal 423 and outputs the decoded blocked shape signal 431. 426indicates the switch which performs switching according to thesignificant area signal 421. 432 indicates the reverse blocking unitwhich integrates the blocked shape signal 427 and outputs the decodedshape signal 433.

The operation of the image decoding apparatus according to the 37thembodiment as constructed above, is described. The encoded signals 419and 415 are input to the decoders 420 and 422, respectively, and aredecoded. The decoder 419 outputs the decoded significant area signal 421to the block size changer 430 and the switch 426. On the other hand, thedecoder 422 outputs the minimum blocked shape signal 423 which is theminimum block containing the significant area range, to the block sizechanger 430. The block size changer 430 changes the block size to thegiven size based on the input decoded significant area signal, andoutputs the changed blocked shape signal 431 to the switch 426. Theswitch 426 will become ON only when input is a signal containing thesignificant area range indicated by the significant area signal 421, orotherwise outputs the value which indicates the outside of thesignificant area range. The reverse blocking unit 432 integrates theinput blocked shape signal and the signal indicating the outside of thesignificant area range, and outputs the two-dimensional shape signal asthe decoded signal 433.

As described above, the image decoding apparatus according to the 37thembodiment has the decoders 420 and 422, and the block size changer 430,the switch 426 and the reverse blocking unit 432, and thereby encodesthe significant area range, and based on it, decodes the shape signal,whereby the encoded signal encoded in the 36th embodiment can beappropriately decoded.

Embodiment 38

An image encoding apparatus according to a 38th embodiment of thisinvention encodes according to the prediction probability and therebyrealizes a good hierarchical encoding.

FIG. 47 is a block diagram showing the structure of the image encodingapparatus according to the 38th embodiment. In the figure, 1 indicatesthe input image signal. 300 indicates a separator which separates theinput image signal 1 into the two image signals 301 a and 301 b to beoutput. 302, 308 a and 308 b indicate the encoders, of which encode theinput signals and output the encoded signals. 330 indicates the decoderwhich decodes the encoded signal 303 a and outputs the decoded imagesignal 331. 304 indicates a prediction probability calculator whichpredicts the pixel value of the image signal 301 b based on the inputimage signal 331, calculates the prediction probability of theprediction, and outputs the probability value 305. 306 indicates a 2ndseparator which separates, according to the input probability value 305,the image signal 301 b into the image signals 307 a and 307 b to beoutput.

The operation of the image encoding apparatus according to the 38thembodiment as constructed above, is described. The input signal 1 isinput to the image encoding apparatus according to the 38th embodiment,and initially in the separator, is separated into the image signals 301a and 301 b. The signal 301 a is selected with priority and is input tothe encoder 302, while the signal 301 b is output to the 2nd separator.FIG. 48 is a drawing for explaining the operating principle of theencoding performed by the image encoding apparatus according to the 38embodiment. In FIG. 48(a), the pixel indicated by the solid-lined circlecorresponds to the image signal 301 a, and the pixel indicated by thedashed-lined circle corresponds to the image signal 301 b. Further, FIG.48 is the model of the two-valued image signal, and the slant lineindicates the true value, and the circle in which there is no slant lineindicates the false value. The encoder 302 encodes the image signal 301a having high priority, and outputs the obtained encoded signal 303 a asthe encoded output and outputs to the decoder 330.

The decoded signal which is subjected to the decoding process by thedecoder 330, is input to the prediction probability calculator 304. Theprediction probability calculator 304 predicts the pixel value of theimage signal having the low priority based on the decoded image signalhaving the high priority, and calculates the prediction probability. InFIG. 48(a), concerning A, the 4 adjacent directions have the falsevalues, and concerning B, the 4 adjacent directions have the truevalues, and as opposed to this, concerning C, the 2 adjacent directionshave the true values and the 2 adjacent directions have the falsevalues. As a result, the prediction that A has the false value and B hasthe true value, has a high probability, while concerning C, theprobability that the prediction comes true is low no matter whether itis predicted that C has the true value or the false value. Therefore, ifC is encoded with priority rather than A and B shown in FIG. 48(a), Cwill be decoded as shown in FIG. 48(b) and the picture quality is lessdegraded when A and B are reproduced based on the prediction, andthereby the desired gradation encoding can be performed.

Accordingly, based on the probability value 305 output by the predictionprobability calculator 304, the 2nd separator 306 separates the inputimage signal 301 b into that which has the high probability 305 as theimage signal 307 a and the others as the image signal 307 b, which areoutput to the encoders 308 a and 308 b, respectively. The encodersencode the input image signal and output the encoded signals 303 b and303 c, respectively. If the encoded signals 303 a to 303 c output asdescribed above have the higher priority in the order to be transmittedor recorded, in decoding, according to that order, the encoded signalhaving the higher priority is first decoded, whereby even when thedecoding process comes to an end halfway during the decoding process,the decoded image in which the picture quality is less degraded can beobtained.

As described above, the image encoding apparatus according to the 38thembodiment is made up of the separators 300 and 306, and the encoders302, 308 a and 308 b, and the decoder 330, and the predictionprobability calculator 304, and thereby the encoding of the pixel havingthe low prediction probability is given priority, and in this way thehierarchical encoding causing less picture quality deterioration withoutany additional information can be realized.

Embodiment 39

An image decoding apparatus according to a 39th embodiment of thisinvention decodes the encoded signal output by the image encodingapparatus according to the 38th embodiment.

FIG. 49 is a block diagram showing the structure of the image decodingapparatus according to the 39th embodiment. In the figure, 303 a to 303c indicate the encoded signals output by the image encoding apparatusaccording to the 38th embodiment, which are decoded by 310, 316 a and316 b encoders to be output as decoded signals 311, 317 a and 317 b. 320indicates the predictor which predicts the image signal based on theimage signal 311, and outputs the predicted image signal 321. 312indicates the prediction probability calculator which calculates theprediction probability for the input predicted image signal 331, andoutputs the probability value 313. 322 indicates the switch whichperforms switching according to the probability value 313.

The operation of the image decoding apparatus according to the 39thembodiment as constructed above, is described. The input signals 303 ato 303 c are input to the decoders 310, 316 a and 316 b to be decoded.The signal 303 a is decoded, and the decoded image signal 311 becomesthe output decoded signal and is also input to the predictionprobability calculator 312 and the predictor 320.

The predictor 320 predicts the pixel value of the image signal 321having a low priority from the decoded image signal 311. The predictionprobability calculator 312 calculates the prediction probability of thepredicted image signal 321, and judges whether the respective pixelsshould be decoded by the decoder 316 a or 316 b. Further, the predictionprobability calculator 312 judges, referring to the priority order 309input from the outside, whether or not the encoded signal having the lowpriority order has been transmitted or recorded. If it is decided thatit is not to be transmitted or recorded, in order that the pixel valueof the pixel not encoded yet outputs the predicted image signal 321 asthe decoded signal 323, the changing of the switch 322 is controlled.Further, concerning the decoded pixel, one of the image signal 311, 317a and 317 b is selected at the switch 322 and is regarded as the decodedsignal 323 output by the apparatus.

As described above, the image decoding apparatus according to the 39thembodiment has the decoder 310, 316 a and 316 b, and the predictionprobability calculator 312 and the predictor 320, and thereby performsdecoding according to the prediction probability and the priority order,whereby the encoded signal encoded by the image encoding apparatusaccording to the 38th embodiment can be appropriately decoded.

Embodiment 40

An image encoding program recording medium and an image decoding programrecording medium realize the image encoding apparatuses and the imagedecoding apparatuses according to the 1st to 39th embodiments.

FIG. 50 shows a floppy disk which is an example of a recording mediumwhich records the program, and FIG. 51 is a flowchart showing theprocedure of the recorded image encoding program, and FIG. 52 is aflowchart showing the procedure of the recorded image decoding program.

The image encoding program shown in FIG. 51 which is recorded in thefloppy disk shown in FIG. 50, is executed on a personal computer or awork station or the like, and thereby realizes the image encodingapparatus according to the 2nd embodiment.

Similarly, the image decoding program shown in FIG. 52 which is recordedon the floppy disk shown in FIG. 50, is executed on a personal computeror a work station or the like, and thereby realizes the image decodingapparatus according to the 3rd embodiment. This case is, in the sameembodiment, one in which the selection is performed by the switch afterthe change pixel encoding process as described using FIG. 6.

As described above, the program recording media according to the 40thembodiment record the image encoding program or the image decodingprogram, and thereby on a computer system such as an ordinary personalcomputer and the like, the image encoding apparatus or the imagedecoding apparatus according to this invention can be realized.

Note that, in the 40th embodiment, although the image encoding apparatusaccording to the 2nd embodiment and the image decoding apparatusaccording to the 3rd embodiment are recorded, the apparatuses accordingto the other embodiments can be similarly realized.

Further, in the 40th embodiment, although the floppy disk is presentedas a recording medium, an IC card, a CD-ROM, an optical disc and acassette tape or the like can be similarly employed, if it is a mediumwhich can record the programs.

Application Possibility in Industry

As described above, it is by this invention, not by the MMR encoding inthe prior art technique, that a large improvement in the compressionrate can be realized in the loss-less reverse encoding by permittingvisually unimportant deterioration of the picture quality.

Further, by this invention, compared to the MMR in the prior arttechnique which is an encoding useing correlations only within a frameand in the horizontal direction, the encoding can be performed using theinter-frame correlation and the correlation in the vertical direction,thereby an improvement of the encoding efficiency can be realized.

Further, by this invention, although the MMR or MMMR in the prior arttechnique can not realize it, the encoded data from which the image canbe hierarchically reproduced by decoding part of the bit stream, arerealized without reducing the encoding efficiency, and the encodingmethod which enables the effective hierarchical image reproduction isprovided.

Further, by this invention, when the image consisting of the shapeinformation and the pixel value information is encoded by the motioncompensation, the motion vector for each piece of information is used,whereby if the motion compensation is performed using the same motionvector similar to the encoding in the prior art technique, the situationwhere the appropriate encoding can not be carried out is avoided.Moreover, by utilizing motion correlation, the improvement in theencoding efficiency can be realized.

Further, by this invention, when the image consisting of shapeinformation and pixel value information is encoded, adaptively switchingthe intra-frame encoding and the inter-frame encoding, this switchingaccording to the property of each piece of information can be performed,and the appropriate and efficient encoding can be realized. Similarly,according to the property of each piece of information, it is possibleto adaptively change the number of motion vectors or adaptively switchthe change or not-change of the quantizing step.

As described above, this invention provides the image encodingapparatus, the image encoding method and the image encoding programrecording medium, all of which can efficiently encode image signals, andprovides the image decoding apparatus, the image decoding method and theimage decoding program recording medium, all of which can appropriatelydecode the above-mentioned encoded signal which is encoded efficiently.

What is claimed is:
 1. An image decoding apparatus for receiving anddecoding an encoded signal to output a two-dimensional shape signalrepresenting an area where pixels representing an object exist,comprising: significant area decoding means for decoding an encodedsignal to obtain a rectangular area which includes an area where thepixels representing the object exist, and for outputting the obtainedrectangular area as a significant area; shape decoding means fordecoding an encoded signal to output a decoded block shape signalcorresponding to respective blocks each comprising a plurality ofpixels; and reverse blocking means for integrating the decoded blockshape signal corresponding to the respective blocks to constitute thetwo-dimensional shape signal, and for outputting the two-dimensionalshape signal as a decoded shape signal; wherein said shape decodingmeans extracts the minimum rectangular area containing the significantarea from the block for each block, and outputs a decoded shape signalcorresponding to the inside of the extracted minimum rectangular area.